@David , As Kalyan mentioned, the scenario/requirement that you're trying to accomplish is very much possible. Performance depends on various factors.
There are a few ways to connect your on-prem database with App service; using VNet Integration with VPN gateway, Hybrid Connections, see the doc Access on-premises resources for more details: https://learn.microsoft.com/azure/app-service/web-sites-integrate-with-vnet#access-on-premises-resources
Also, Just to highlight, Azure offers a number of ways to host your application code.
Azure offers several ways to host websites: Azure App Service WebApps (PAAS solution), Virtual Machines (IAAS), Service Fabric, Azure Storage (for static website) and Azure Static Web Apps.
The term compute refers to the hosting model for the computing resources that your application runs on. The flowchart in the doc, will help you to choose a compute service for your application.
- This article helps you understand the options and make the right choice for your web application.