So, I figured it out with Gemini. Basically:
1) Create a container with the --root flag: distrobox create --root fedora
2) Enter it: distrobox enter --root fedora
3) Install the package from the file with the standard command: sudo dnf install path/to/.rpm
4) Get an error about an uninstalled dependency. Ask Google and install the required package.
5) Get an happ error: error while loading shared libraries: libOpenGL.so.0: cannot open shared object file: No such file or directory
6) Learn from Gemini that containers with the root flag are isolated from the rest of the system and that absolutely all dependencies must be installed in the container itself; they are not pulled from the system.
7) The error in step 5 for the happ program is resolved by installing the fontconfig package.
8) Now the program runs in the container using sudo happ and works properly.
9) Export the program with the command distrobox-export --app happ --sudo
10) A desktop file is created, but if, like me, you ignored distrobox's request to update the superuser password, the program won't launch via the shortcut and will return an error about the askpasswd environment variable.
11) Open the desktop file (at ~/.local/share/applications) in a text editor. It will contain a line like Exec=env SUDO_ASKPASS="..." DBX_SUDO_PROGRAM="sudo --askpass" ...
Delete DBX_SUDO_PROGRAM="sudo --askpass". Now the VPN client launches via the shortcut without errors (but with a terminal window). You can also disable this by leaving only Terminal=false from the line Terminal=falseStartupWMClass=happ.