Welcome to the community @summersurfer
You can certainly have a Klaviyo pop-up with a static discount code and that doesn’t require an email address to be captured. If it’s a general discount on offer, it doesn’t need to be dynamic - just single use per customer. Great if that code is shared widely I think!
However, a unique dynamic code needs to be allocated to a profile by email address. Whenever the dynamic discount code placeholder is added to a message, a contact always receives the same unique code. Often, dynamic codes are used or higher discounts (winback etc) that you don’t want out in the wild!
I would consider asking for their email as it’s a great opportunity to capture that data and provide follow-up too, for example, a flow to nudge them into using it, provide a soft sales pitch, etc. I think it’s a reasonable exchange for the contact - their email for a discount - and it’s an acceptable approach. If they don’t want to provide their email for a discount, then they’re likely not that interested in purchasing.
Hope that helps
Andy