It is not possible for humans to catch worms from animals but it is possible only if worms are hookworms. You are suspicious about tapeworms but they cannot directly transmit from cats to humans. Sometimes small children can by chance ingest its larvae on the floor and catch a tapeworm illness. May be you have taken in its larva that is by chance entered into your food. Keep your cat away from kitchen or other edible things till it recovers. You can use de-worming medicine that can be taken as an oral medication or by injection. The frequent anti-parasitic agent that has been used is praziquantel and one other effective medication is epsiprantel.
No never take pet medication. See a doctor for the test. Unfortunately yes you can contract tapeworm from a pet. Fleas can transmit tapeworm.