Internal link to a file in another folder

How do I create a link to a file in a different folder so that the user sees the file in different folders, but in fact it was the same file?

I think it is not possible.

But you can install the app “link editor” and link to a subsubfolder
e.g. for a subsubfolder path1/path2:
https://cloud.server.tld/index.php/apps/files/?dir=/path1/path2

In the link settings you can activate open in same window and not keypress for open it.
Sorry. It do not really solve your problem. Perhaps there is a better app.

https://apps.nextcloud.com/apps/files_linkeditor