Your problem is not the technique (oData, Rest, Datahub or Java) but your problem is access-rights to the SQL-database. Those rights can be provided in the form of credentials (userid+password) or rights to use an available service. For this you need to talk to the persons/managers who are in charge of acces to the SQL-database. If they do not give you access, then it is ‘game over’.
Once they do give you access, the hard part is over and you can implement your solution.
If you are not allowed to connect to the database directly (which I assume as you have written you do not get a user and a password for the database), you need a service to get and update data. This service must be provided by those who own the external database. It can be REST or ODATA. Both are easy to connect to with Mendix apps.
If you want to consume OData services then you have use datahub and with that you can register your external Odata service and then you can consume using Datahub .
Documentation registering external OData is available you can refer that.
Consumed OData Services | Mendix Documentation
Based on the information you provided, if your external provider has a ODATA service created for you by authenticating with either user name password or via a certificate (More secured) will resolve the issue.
Once you have Odata service ready, you should be able to consume from mendix app and show as Non-persistable data in Mendix (Like you mentioned could write logic to Datagrid source microflow directly) and any data modification should call another Odata service to write back to the external server will.
You need two Odata calls, one getlist and another create Odata call.
Also if they have a rest api, should be able to consume securely via JWT or any secured way of using works (Like auth token).
Hope it helps,