Yep, AGPL can run alongside proprietary services without issues, and if you host it without modifications, you don’t have to share anything. But if you modify it and make it available over a network, you have to provide the source to users.
Mathesar, however, is GPL, so you only need to share modifications if you actually distribute the software itself.