When your dog vomits or has diarrhea containing spaghetti-like segments or rice-like objects, they may have a tapeworm or roundworm problem and should be treated and vaccinated by a Vet as soon as possible. Hookworm also can be responsible for diarrhea in young puppies or weight loss and a poor coat of fur in older dogs.