I'd ask your vet, it depends on the individual situation of the dog and how likely it is for them to come into contact with it. It's spread in feces and urine, so if your dog lives in the backyard and poop isn't regularly picked up there and things aren't cleaned, that's generally where they get it from.
The reason it's not recommended is because there's actually no scientific study that shows it even works that well. No dangerous side effects though, so it probably won't hurt to get it regardless.
The reason it's not recommended is because there's actually no scientific study that shows it even works that well. No dangerous side effects though, so it probably won't hurt to get it regardless.