Use two databases in the same application

I would like to use two databases in my app, one that is local like MySQL and the other in the cloud like Firebase.
Reason: suppose I use a database in the cloud and my client has to make a query or register some information in the app and his data package has run out or the place where he is has no internet signal. In this case, would you be able to do this using a local and a cloud to serve as a backup?
I searched the forum and didn’t find what I wanted.