These are tapeworm segments. Tapeworms are long segmented parasites that can live in the intestines of dogs and cats. Occasionally, segments will detach from the worm and be passed in the feces. These inch long worms can often be found stuck in the fur around the anal opening, in the pets bedding or directly in their feces. When they first come out they are white and usually still moving. They quickly dry up and look like little pieces of white or brown rice. A deworming medication specific for tapeworms is needed to eliminate the infection. Animals commonly get tapeworms by ingesting eggs found in other animals feces or by eating insects that carry the eggs. Fleas often carry tapeworm eggs, so dogs and cats with fleas often have tapeworms as well.