Just to add to many of the answers, I think you can get close to what you want depending on how you structure it.
If you are okay with it being something like only certain (preferably top level) directory offline, you can combine mount
with bisync
(or another 3rd party sync tool like syncrclone, which, full disclosure, I wrote).
I do this roughly with OneDrive. I have my "offline" files I really need to always have which sync both ways. But then I mount the rest.
You may also be able to do something like a union of the local and remote but there are some limits on how that may work.