Not necessarily. The easy way to implement this in-person would be to give customer-specific coupons. You could get an email that says "use your loyalty card at checkout and get $2 off eggs". Then you just give everyone a different discount and only the privacy-minded folks end up paying the (inflated) sticker price.
A significantly more complex hypothetical that I don't think anyone is doing yet: With digital price tags and customer tracking you could show different prices to different customers in-person. For example, when Alice goes to the eggs it could say $2 and when Bob goes to the eggs it could say $4. Then you just need to track the customer to the register to make sure you give them the price that was displayed. I believe the amazon "go" stores were doing the whole customer tracking thing so we already have the necessary tech demonstrated in real stores.
A significantly more complex hypothetical that I don't think anyone is doing yet: With digital price tags and customer tracking you could show different prices to different customers in-person. For example, when Alice goes to the eggs it could say $2 and when Bob goes to the eggs it could say $4. Then you just need to track the customer to the register to make sure you give them the price that was displayed. I believe the amazon "go" stores were doing the whole customer tracking thing so we already have the necessary tech demonstrated in real stores.