Worms????

This is the 2nd time I’ve seen something like this. The first time my 4 year old was having a bowel movement and I saw what looked like something like this right on the tip of the poop while coming out, but didn’t see anything after.

Now she just went peed & wiped herself then said she had to poop and I saw this on her. When I grabbed it with toilet paper it looked like it completely disappeared? Or maybe it blended in with the toilet paper idk but I didn’t see it any longer. Could this be worms or just discharge or maybe just rice?? I didn’t see anything in her poop though like I said although it was kind of hard to even see. She does complain of itching on her bum/vagina here & there