These are most likely tapeworms (Diplydium caninum). These are worms that live in your pet’s intestinal tract.
Your dog became infected with these by eating a flea, so you should also closely check your pet for fleas. If possible, a fecal sample should be brought into the vet clinic to confirm the infection.
Your veterinarian can also help you rid your pet of both the fleas and the tapeworms!