This isn’t a supported use case for classic (see Process for reviewing classic confinement snaps) in part because there is no guarantee that firefox would even be on the classic system or that the one installed would be compatible with your snap.
For your snap to work everywhere, it should ship what it needs in the snap. You can use ‘stage-packages’ to install binaries from the Ubuntu archive in your snap, or ‘stage-snaps’ to install snaps from the snap store. In this manner, your snap will always have exactly what it needs at the locations it expects.
A possible future alternative would be for the firefox snap to support headless mode and for snapd to somehow expose that, but it sounds like you are trying to drive firefox rather than simply open a page, so that is probably not possible without the firefox snap exposing content for other snaps via the content interface.