Sure, you can make rental accommodation illegal if you want your community to consist solely of homeowners -- some HOAs do exactly this -- but it's the most vulnerable who will suffer under such a policy.
It's a popular policy decision for many politicians, since owners vote at much higher rates than renters; but I wouldn't call it good policy.
That said putting more restriction on housing (even more taxes!) isn't going to improve the situation. Housing needs deregulation, not more regulation to distort the market even more.
The difference is that the metaphorical credit card of a HELOC has the house as collateral. A normal credit card has no collateral. If you go bankrupt, the HELOC takes the house, but the credit card doesn't.