Hi,
There is nothing ready-made to do that.
One simple solution is to make view overrides of where add to cart buttons are displayed (in product / quantity and in product / add_to_cart_ajax ). There, you can check if the user is logged in or not and if not, change the "onclick" of the button and the fallback_url to, for example, redirect to the login form with an appropriate message.
That's quite lightweight as a solution. The biggest flaw here is that the user session might expire between the time it displays the page on his browser and the time he clicks on the button, circumventing this check.
A more complex, but more elegant solution, would be to implement the onBeforeProductQuantityCheck(&$products, &$cart, &$options) event in a custom plugin. In it, you can check if the user is logged in, and if not, you can set the "qty" to 0 in the products in the $products array and add a messsage like so:
$cartClass = hikashop_get('class.cart');
$cartClass->addMessage($cart, array('msg' => implode('<br/>', $messages), 'product_id' => $id, 'type' => 'error'));
We're using the same principle in the cart reservation plugin available on our marketplace in order to block users from add products to their cart if others already have the last elements of the stock in their cart.