My understanding is that - depending on the jurisdiction - a pharmacist is allowed to refuse filling a prescription if:
- They are morally opposed to the medication, ex: "abortion pills"
- They know that the patient is taking another drug that would result in a deadly interaction
- The patient is drug-seeking a scheduled drug, ex: they've brought multiple valid prescriptions for opiates, but from different doctors
The pharmacist doesn't know why you've been prescribed Ivermectin. They can ask, but you're under no obligation to tell them. Maybe you need it for river blindness. Unlikely, but it's none of their business.
I guess a pharmacist could claim moral opposition to filling an Ivermectin prescription if they believe that sans Ivermectin the patient would instead get a COVID vaccine. That makes sense to me. But it's a slippery slope I'm uncomfortable with.