I think ivermectin doesn't work, but there's nothing wrong with a doctor prescribing it off label in a COVID context. It is not unsafe enough, generally speaking, to override the judgement of an individual doctor. The legal/regulatory system explicitly permits this, and there are other examples where doing this is likely ethically positive.
For example, there was a big controversey around lucentis and avastin where doctors found they could treat peoople with wet AMD with avastin far more cheaply, but the pharma (which marketed both) wanted people to use the far more expensive drug. Doctors actively precribed avastin instead of lucentis and treated patients (most case reports coming in positive) and then finally a large trial was run that showed it was basically as good as lucentis. Ethically, in retrospect, we say the doctors were acting in a good way (saving patients for less $$ and probably treating people who couldn't afford lucentis). I could imagine the owner of the two drugs running a PR campaign "Doctors: why are you prescribing a cancer drug to eye patients? Do you want to kill them"?
> Ivermectin is an FDA approved drug for use in humans to treat a variety of parasitic infections including parasitic worms, hookworm and whipworm. It may also be used as an effective treatment for a wide range of other conditions and as a treatment of onchocerciasis, intestinal strongyloidiasis and onchocerciasis or river blindness.
*(Outside the context of literally treating horses)