Bots can be a problem in pets, they are usually transmitted by flies. To me it looks rather like a caterpillar but if it was in the stool, i am not sure what it is.
I am certain that you will end up spending much more money on self treating and it might not work as it should, then going to a vet. At least you would find out what parasite it is. Self treating your dog is very dangerous too. Alb and ivermectin might not be what this parasite needs. Besides some dog species cannot tolerate ivermectin and they can get a bad reaction. You really need a vet.