In the Shopify theme "Dawn," you can restrict the "Add to Cart" button so that only members can purchase, but you can also set it on a variant-by-variant basis. Here is an example of how to do that.
An example of a setting on the product detail page for the theme "Dawn" that allows you to specify whether member registration is required to add each variant to the cart.

[Method 1] Create a variant metafield that allows you to specify whether or not individual variants require membership registration.

[Method 2] Add a customized Liquid section to your product template and insert the code

[Setting Method 3] Set the value of the metafield "Members Only" to true for each variant that can only be purchased by members.

