I don't think that we can get worms from cats but I could be wrong. If the worm looked like a grain of rice, then it's probably a tapeworm. The treatment is very easy. The vet will give the cat a pill or two and this should get rid of the worms. Good luck.