Do the worms look like flat grains of rice? If so, they are most likely tapeworms. The only way to get tapeworms is to ingest a flea that has the tapeworm larvae, so a cat with tapeworms has or has had fleas. You won't see them all the time, just occasionally when they are passed, so just because you aren't seeing them doesn't mean they are gone.
If they are tapeworms, the ones in the bowl came from her, not the food. However, if they are not tapeworms, then it is possible they came from the food.
Tapeworm segments look like this:
When they have dried out, they REALLY look like rice.
You can get medicine to treat for tapeworms over the counter, but make sure that it says it treats for dipylidium spp., not just taenia spp. A lot of the OTC dewormers state that they get tapeworms, but it's not the type of tapeworms that dogs and cats actually get, so you'd be wasting your money. You can also call your regular vet and let him or her know that your cat has tapeworms. Many vets will just dispense the tapeworm medication without necessarily needing to see the pet, IF the owner is a regular client and they have seen the pet sometime in the past year.
If she does have tapeworms, you also need to get something for fleas, since the only way she can become infected with tapeworms is from a flea.
If you don't think it is a tapeworm, then I would recommend having her seen by your regular vet to determine what is going on. To make things much easier for her, bring a fresh stool sample with you for your appointment, so they don't have to use the loop up her butt to get a sample.
I hope this helps - good luck with her.