my senior calico cat did something odd just moments ago

she used her litter box this morning had a bowel movement and then I saw her rubbing her butt along the floor YUCK

does this mean she has worms?

she was an outdoor cat a few years back but we moved into an apartment 2 and a half years ago so she has been an indoor cat ever since