A dog eating dirt is not much of a concern and they will not get any harm done to them when eating small amounts of dirt.
Dirt is actually nutritious to the dogs as well as humans and even when kids eat some dirt they will be perfectly okay.
My son used to eat dirt when he was 2 years old and 3 years old and he's now 13 and perfectly fine and I also had a dog that would eat dirt as well.
The dog will be okay when eating dirt and there's nothing wrong with it.
Eating the dirt is much healthier than eating poop so if a dog can eat their own poop they can eat dirt as well.