I am so grossed out. I tried to research this for you, and found that someone else experienced the same problem and asked an online vet about it. That vet suggested that the dog might have tapeworms. I'm not sure if you have your dog on prevention but if not it might be worth doing a fecal. Here is the link.
I have an adult female dog who uses a potty patch in the - JustAnswer