The publication for an add-on can't be changed from Private to Public, I believe.
And there is no "built-in" way to have some kind of hybrid combination between Private and Public.
I'm guessing that you'd need to publish a new add-on as Public, and then require each non-domain user to sign up and be approved for access,
probably something like a paid add-on would work.
Your code could check the effective user for the correct domain part of the email address before running and reject all non-domain users unless they
are in the approved list.
You'd need to maintain a "Customer List" of approved accounts.
Actually, you'd probably want to publish as Public but Unlisted in order to avoid having it visible to the whole world on the Marketplace.