My puppy threw up a worm but there are no worms in her poop what type of worm might it be?

I am still going to take her to the vet but lately my pups have been throwing up, a few of my dogs have the runs, one of my pups keep coughing, and two of my cats kittens died. I thought they were probably too cold and that why they were dying. I was hiking with my pug puppy and she threw up a long white worm. It squirmed and eventually coiled. I have been checking their poop everyday and there has been no worms in their poop. I did notice that sometimes their poop would have blood in it. My mother said that's because they didn't have veggies in their dog food. I live in a farm and their food is homemade. Any ideas on what type of worm this is?
My puppy threw up a worm but there are no worms in her poop what type of worm might it be?
Post Opinion