Ivermectin is a very safe treatment. If a patient has Covid, then it will do no harm. If they are vaccinated and still get Covid, it will also do no harm. If they refuse to be vaccinated, then also using Ivermectin will again do no harm. It may not prevent or cure. But it does no harm. Doctors can prescribe treatments that are off the intended purpose.
There are a lot of studies on various uses for Ivermectin. None of them seem to show any negative effects.
Some are targeted at antiviral effect. Controversy and censorship are clouding the issue at this time. I hope studies will continue under less strained circumstance.
The article does not detail the circumstance of the patient situations and requests. The Doctor may have thought a harmless or possibly helpful prescription may have had some use. If only psychologial.