We have not tested out this exact combo at Appeon so I cannot say what are the tips and tricks to watch out for. But theoretically it should work if you use ODBC. Hopefully, somebody else can chime in here.
But I will add that from a security perspective it is not recommended to do this, and you could also introduce significant performance issues or you would need to make some noticeable changes to your source code.
From a security perspective you generally don't want to open up the database to the world. Over the Internet typically you want to keep it to HTTP communication to the Web server and lock down your database.
From a performance perspective, PB roundtripping to the database over an Internet connection has much more latency than the same transmission over a LAN connection. If you have a couple roundtrips to complete some action then that should be tolerable, but in our experience it's common for an app to have at least some areas that make dozens or hundreds of calls.