Pinworms are thin, white intestinal parasites that do not infect dogs and thus would not appear in a dog's stool sample, as stated by Healthline. The most common pinworm species infects humans and can only be transmitted from person to person, according to the Centers for Disease Control and Prevention.
Pinworms exit an infected person through the anus, leaving eggs on the surrounding skin or local environment, such as pajamas or bedding; however, they rarely appear in stool samples, notes the CDC
If worms appear in a dog's stool that are similar in appearance to pinworms, they may be tapeworms, according to VetInfo. Tapeworms are also thin, white parasitic worms that target the intestine. Tapeworms are comprised of small segments, and these segments can detach and exit through the anus, often appearing in a dog's stool, as explained by WebMD. These segments may be crawling, or they may appear as hard specks once dried out. A vet can confirm tapeworm diagnosis by analyzing a sample of the dog's stool.
Several treatments exist for tapeworm infection in dogs, including epsiprantel, fenbendazole, and praziquantel, as reported by WebMD. Tapeworm infection in dogs results from ingesting infected fleas; therefore, controlling fleas on a dog and in its home environment is key to prevention.