Sometimes they eat rocks due to a deficiency in their diet....I can't remember what it is off the top of my head but maybe try a google search on it...i'll look and see what i can find for you.
Ok I found this on another forum and it agrees with most of the other stuff I found, It was in response to someone's post that the dog had already needed surgery:
1. I would ask my vet if there was a reason she could be eating rocks-some kind of deficiency, perhaps or if dogs get pica, something like that...(pica is associated with anemia~ iron deficiencies)
2. Leaving her out unattended isn't good anyway, and if she's like my dogs she'd rather be with her person whether it's in or outside, so having to be in or out and supervised isn't a bad thing.
3. Depending on the breed and given the severity of the problems she's had with her stomach, I'd ask my vet if she should have a basket muzzle while she's out until I could train her well with the leave it command. Still under supervision and not out alone.
4. Going to obedience classes with her to give her those basics, plus if you find a good one, they will teach the leave it. Leave it is something I say every day, and every day I am glad I taught it, when I drop a pill, or break a glass, or two dogs are getting ready to fight for the same toy...
Also there was a suggestion of when you take the rock away give some other more suitable object for them to chew on.