I'm American. My understanding is that in the US you need a prescription from a licensed healthcare professional to get medication from a pharmacy. This usually means a doctor but in some states a physician's assistant may have the authority to write prescriptions.
In the US, if it doesn't require a prescription, it is sold over the counter, though they may check your ID to see if you are a legal adult for some things.
I have heard anecdotally that in other countries pharmacists can sometimes dispense medication without a prescription.
HN is a very international discussion space. This fairly often leads to people speaking past each other as their comments may well be rooted in a completely different set of assumptions and mental models about how such things work.
Meanwhile people regularly and irreparably blow up their livers with paracetamol and no one gives a damn.
Then there's cocodamol, where in an effort to avoid "addiction" issues the relatively safe opiates are cut with relatively low-LD50 paracetamol.
I don't think an informational campaign would have helped with the ivermectin problem. Underlying that was the conspiracist belief that people were lying to them. Why would they believe a safety leaflet?
However, in theory thats why people have GPs or PCPs, to oversee their treatment. Yes, they were overloaded (as they always are), but if people want to try a treatment, in general we shouldn't say no. We should enroll them in a trial, etc. And we should say no when we have enough data to be sure that it's very unlikely to work, and still, in general fighting scammers/fraudsters and various snakeoil salesfolk should be done through prosecution of those who knowingly make false statements, thereby intentionally defrauding vulnerable people, not through right to sell shit. (And yes, this is a very hairy topic, because everything is fucking expensive when it comes to medicine. But that's one more reason to streamline it instead of having a cottage industry is these trial runners hemorrhage money into a thousand pockets.)
And also afaik the biggest problem with Invermectin wasn't that people were overdosing on it, it's that they were treating it as a prophylactic or potential miracle cure which meant they didn't have to worry about catching or spreading COVID (or get vaccinated, when the vaccines were introduced). "Homeopathy doesn't cure HIV, but here are the dosages of homeopathic remedies which people looking to manage their HIV status with homeopathy rather than antiretroviral drugs and condoms should take", said no public health information campaign ever
Afaik Invermectin has all the safety information regarding its dosages on the packet anyway (at least the packets designed for human use...). Doesn't mean people getting health advice from people shouting about the evils of the medical profession on talk radio or Facebook necessarily acknowledged them.