I think they can still get tapeworms even if they are on a preventative. It is my understanding and I may be wrong they get the tapeworms from eating fleas or flea eggs. My guys both got them last summer and they were on a preventative. Here is a link that describes the tapeworm and ways to prevent it.
Tapeworm in Dogs - A Definitive Guide to Tapeworms in dogs
I took a fecal sample to my vet for a correct diagnosis and was given pills to give them. It took care of them right away.