The document portal recently added an API to retrieve the path on the host for an file opened over the file chooser portal.
If I’m correct, this would the the API in the portal:
Though some libraries may offer other methods to query this information. For GLib and GTK, look here for example:
That being said, this API is fairly new, only added at the start of this year. So if your app runs on a system with an old XDG desktop portal, the API will not be available.
So the easiest way is still to give broader filesystem permissions for now. Or you could implement a check for the API version and, if on a too old version, ask the user to provide the necessary permission.