Get ready for a story..... my dog Jessie, when I first got her (she was a rescue, 6 YO) used to eat from the cat box when I was at work - I never knew it. She would walk around the house gagging , then started to get mopey - I took her to the vet and INSISTED there was something wrong, (emergency too, cost me $600 on a Friday night) They induced vomiting by putting drops in her eyes, odd, but it was a TOTAL cleansing of her stomach - it was about 10 pounds of cat litter that she up - the vet tech called it the 'motherload' - So, if you think your dog does this when you are not home, be careful and tell your vet that this is what he/she does. X rays will not show this - they only show metals -
Now, on the other hand - she still, at 13 YO, will go outside and eat grassand then come inside and start gagging like you said yours does, but all it is is the grass is stuck in her throat - almost like a piece fo hari
Good luck,