Dogs often eat grass to cleanse their digestive systems. The might vomit it up or poop it out but it's not really a major concern.
Regarding eating dirt, it seems like someone already mentioned that there might be certain vitamins or minerals your dog is lacking. I'd hate to tell you what one of our dogs eats and according to the vet it's for the same reason - vitamins and minerals. He gets those in his food but he still likes to eat this substance. If the vet isn't concerned about your dog eating dirt and the dog isn't being harmed by it, maybe just keep an eye on him. Since he's a puppy and recently rescued, something in his past might attract him to the taste or consistency of dirt.
Some dogs will eat anything. Just keep an eye on him.
lonewolf
My 12-year-old chihuahua-terrrier mix has eaten dirt since the day I brought him home from the pound (8years ago). My vet said it's just a strange habit! He couldn't think of any nutritional benefit to eating dirt. And my dog only eats certain dirt too- we have a lot of red clay dirt around here and he won't eat a bite of it.
I am not forsure, but I have heard that when dogs or children go after dirt, that is a nutritional issue, something is low in their diet, iron, ????
Grass dogs generally eat to clean their systems out, like we would eat fiber...
Dirt, could be he/she is lacking in nutrient, try added some better quality dog food and mix with the dog food hes use to now, mix half and half....see if it stops...
Plus, someone one the site will give more advice, much luck to you, give you dog a big hug from Texas:o)