Based on what I remember is it is possible to access an On Prem SQL database via Azure function but for that the Azure function should have been deployed under App service plan and you would have to set up hybrid network for the same.
Also, you cannot paste data into Azure function as it is not a storage layer.
So you can use Copy activity to copy data from On Prem SQL server into an Azure blob storage (as low cost) and read data from blob storage within Azure function