This pup is only 18 weeks old. In that time, the first time it probably rode in a car, was to go to a strange place, with strangers, that were inexperienced people, and were not well suited for the dog. In a short time, the pup was again put into a car, probably his second car ride, and taken to yet another strange place, with strangers. He took a car ride to the vet, which is another stranger, doing uncomfortable things to it. Are we starting to see why the pup is scared of getting in the car? Are we starting to see why it has a bit of a confidence problem?
It arrives to your place. Just learning the new place, and getting to know you, are actually training to the pup, just not obedience type training. At this time, you seem reluctant to let it in it's own backyard due to the tapeworm situation. It's had it's first treatment, and as long as you follow up on time, it should be fine to allow your dog into your yard. If you're concerned, grab some grocery bags, and clean up after it when it poohs.
Remember, this pup, in it's short life, each time it's tried to bond with humans, it has not worked out. Give it more time to bond with you, so it can arrive at the understanding that you, and it's new home is permanent. In the meantime, the only thing I'd be training it right now, is sit. Remember to tell it to sit, each and every time you open the door. That way the pup will learn not to try dashing out the door when you open it. Use lots of positive reinforcement, not just treats. When it seems to be scared, pet it, pull it close to you, talk to it. Show it that whatever it's afraid of is ok, whenever possible. When the dog is better bonded, and more confident in you, it will also gain more confidence in itself. Once it's more confident, then you can add one more command along with sit. Training sessions should be about 15 minutes 2 - 3 times a day. Allow a couple weeks, then add another command, or improve leash training with the word heel. Each time you take it out, and it begins to potty, SAY potty, potty, potty, potty, until it finishes. While this is not training, like the word sit, it won't be long that you can let, or take the dog out on a rainy day, or when you're in a hurry, and say potty, potty, potty, and it will trigger a potty response.
To help with the car, in a couple weeks when the pup is a bit more settled, cover the seats, and flooring with some plastic drop cloth, a shower curtain liner, a tarp, or whatever you have, and take it for a short ride around the block talking to it constantly, then when you get home, give it a treat. Do this every day for awhile. IF after a week of this it still throws up in your car, be aware that some dogs do get motion sickness. I had 4 Chow Chows that love riding in my SUV, but one that got motion sickness, would throw up, and didn't really like going for a ride. You'll probably know at the time whether it's fear, or motion sickness.
When it's more acclimated to you, and it's yard, is a good time to begin some basic leash training. I like to begin with a harness, instead of a collar. If walking around the block is too stressful, walk half way down your block, then turn around, and head home. Get it used to seeing other dogs, cats, squirrels, people, etc., but not trying to go after them. Don't forget to use sit, if the dog wants to chase a cat, or squirrel for example. Teaching it to herd now, is too soon. That will come in time, and when you have something it can herd.
I hope this has helped some.