Hello there, Welcome to JA , I am DrD , Thank you for the question
You are describing tape worms
The drug for the tape worms is Praziquantel
If cat has tape worms he must have fleas since tapeworms contracted to cats by fleas.Your cat will not get rid of tapeworms unless you apply monthly flea medication.
Unfortunately you can not obtain praziquantel from a pet shop or anywhere else. You need a prescription.There are many flea products available . You need to be VERY VERY careful when you pick a flea product ( spot on products applied on
cat's skin once a month)
Some dog products are highly toxic for cats . They even may kill your cat if you pick up a wrong product.So please be careful.
The above is given for information only. I can not prescribe medicines or diagnose your pet's condition without performing a physical exam. If you have concerns about your pet condition I would strongly advise consulting your veterinarian.
I hope this helps.If you need to ask more questions please do not hesitate to ask