Yes, there is a fungal infection that dogs get from eating contaminated soil or bird droppings.
Histoplasmosis is an infection caused by the Histoplasma capsulatum fungus.
The fungus then enters the dog's intestinal tract and an infection develops from there.
If your dog eats poop their breath will smell terrible!