Hi,
Yes, you can do it like that.
Note however that doing it like that will remove the price from these products for guests.
However, if you want to allow guests to see the prices while prevent them from adding the products to the cart, it would require create a custom product field so that you could select between yes/no for each product.
And then, in the view file where the add to cart button is being displayed, you could add some code around the add to cart button like that:
if($this->row->xxx == 'yes') {
// code to display the add to cart button
}
where xxx is the column name of the custom field.
Now, it might require adapting a bit the code based on where you add it exactly.
To check which view file to edit to target the add to cart button, you can activate temporarily the "display view files" setting of the HikaShop configuration.