Ivermectin is a good dewormer. But, It will only take care of Large Strongyles, Small Strongyles, Pinworms, Ascarids, Hairworms, Large-mouth Stomach Worms, Bots, Lungworms, Intestinal Threadworms.
Pyrantyl will take care of large strongyles, small strongyles, pinworms, and large roundworms.
Roundworms are probably the most common worms that horses will get. And ivermectin doesn't kill them. So its important to rotate dewormers when you do deworm.
Fecal exams done in spring and fall will tell you if you need to treat, and if so, by using what.
There is no way to kill eggs in your pasture. Many horses are probably never completely clear or worms because of their grazing nature. There will also be eggs. So it is important to deworm. But...only when you need it, and for exactly the type of worms you have. Otherwise worms will become resistant to deworms and eventually well need stronger and stronger pesticides...or...no deworm will work. We will have created a "super bug" so to speak.
Don't feel bad. We've all made mistakes in our horsemanship. You were just following instructions by you vet/friend.
"The greatest pleasure of a dog is that you may make a fool of yourself with
him and not only will he not scold you, but he will make a fool of himself too."