Yes, but is this just for a specific Firefox extension, or do you need some way to do this automatically for a large number of Firefox extensions?
For example, to find the ID used by the Bitwarden browser extension in Firefox, you can just open the extension, then right-click in the extension window and select “View Page Source”. You can then extract the extension ID from the URL in the browser address bar.
But perhaps I’ve misunderstood what you’re looking for.