Sounds like two different infestations, if that eases your mind any. :)
The short, white worms on your pets are tapeworm segments, and they get them from ingesting fleas. The flea control products from your vet are really the only thing that works and won't poison your pet. The sticker shock...