One way to detect tapeworm in dog feces is by closely examining the feces for tapeworm segments, which resemble grains of white rice. If you suspect your dog has tapeworms, it's important to take a sample of their feces to your veterinarian for further examination and testing.