You cannot simply call Import-Module Az.Profile like on your local machine where you have previously installed Az.Profile from that site. But you have to copy all files from that locally installed package into specific folder inside of your Function App in Azure.
1.Install Az.Profile in local and go to its folder to get all the content in it.
2.Go to your function KUDU. Click CMD>site>wwwroot>yourFunctionName then create a directory called modules.
3.Simply drag-and-drop all files from your local powershell module location to your Azure Function App folder create above(modules).
4.Include Az.Profile PowerShell module in run.ps1 file like that example below:
Import-Module "D:\home\site\wwwroot\HttpTrigger1\modules\Az.Profile.psd1"
5.Install Az.Resources and CosmosDB module as above steps.
6.Run Get-CosmosDbOffer -Context $cosmosDbContext and you will get the following snapshot.

For more details, you could refer to this tutorial and this one.