Have Cat Questions? Ask a Cat Vet Online.
The only way to know for sure is to either see them in the poop or take a fecal sample by your vet for analysis.
If you suspect that the cat has worms, you should scoop a fecal sample from the litter box, put it in a plastic bag and take it to your vet. The vet will then prescribe a dewormer that will take care of it.
Let me know if you still have questions.