Do not panic, he will probably be fine. Just pay attention to him, and as long as he is eating and pooping normally, it will pass on through! Rats in the wild eat all sorts of things we do not actually consider food, and as it was just a few nibbles, I wouldn't worry about it!