It should be possible using native messaging [1] which can call out to an external binary. The 1password extensions use that to communicate with the password manager binary.
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...