Azure DevOps also has a solution called Azure DevOps Server. It allows you to host you source code on-prem, and also build on-prem. Depending on your needs you could store your artifact on-prem or in the cloud and either way, it would allow you to deploy in the cloud.
So, yes, it is possible, but it will take quite some effort. At least you'll need a server for Azure DevOps Server, depending on the size another one for your database, and another one for your build and release agents. It will also take some effort to put together the pipelines and other infrastructure required, but if you really need to keep your sourcecode and builds on-prem this will definitely work for you.
Let me know if you need to know anything else.