i have a rat that was too small when i got it from the store about a month ago, so i kept her in a tank until she was ready to feed off! well she's a pet now, i can't feed her off

anyway i heard they eat their own poop, but i didn't know how true it was. I just seen it with my own eyes, she's eating her own stuff. is there anyway to prevent this, or is this what they do?