Can you get tapeworms from a pet cat?

Yes. Dypilidium can be acquire by accidentally ingesting a cat flea contains the immature form of the worm.