My dog has white rice grain worms in her poop and she is excessively thirsty
Tapeworms and roundworms are intestinal parasites, that absorb the nutrients of the food causing severe malnutrition in dogs. Hence the importance of the internal deworming of puppies.
Your veterinarian will give you the product to eliminate them, to use it follow your veterinarian's instructions. There are worms that are difficult to remove and some of them are very persistent. Unless veterinary prescription says differently, you should repeat internal deworming at least every 3 months.
It is very advisable to take a sample of the worms to the veterinarian so he can know what type they are.
All the best,