I can see a couple of different problems in your question above, so I'll answer them separately , if thats okay?
The first asks about dogs pulling hair out of their tails. There are lots of different reasons for this to be happening so there is no straight forward answer , I'm afraid. You mention anal glands- yes, this is one cause of this behavior- so I'd definitely make a point of having them checked. If he's also rubbing his bottom against the ground- or 'scooting'- the problem is probably his anal glands. CKC spaniels are quite prone to impacted anal glands , so you may find that having them emptied and maybe putting him on a course of antiinflammatories and/or antibiotics ( if required) may help. You then need to look at why his glands have become a problem. Some times changing food or getting your pet to lose a little weight can really help in this situation.
Here's a good link about Anal glands
Of course, it might not be anal glands causing the problem, especially if he's not 'scooting'. He may have worms, so making sure he's up to date with his worming can help, also fleas can cause 'Flea Allergy Dermatitis'. Is your dogs flea control up to date? Has he got hair loss up his back as well as on his tail? Even if you can't see fleas on him you need some decent flea control- I'd recommend using Frontline drops. This may not be enough if he's got an allergy to fleas and you may have to go and see your vet for some anti inflammatories as well as using flea control.
Other causes of itching around this region are allergies, perhaps to food or something in the environment. Again, this is something you need to visit your vet about.
The second issue in your question is the vomiting of hair. Dogs vomit very easily and hair not being a food stuff is often vomited up if it's swallowed. I think the problem is that he is itchy enough to be swallowing the hair but when you go and see a vet , definitely mention the vomiting, also if she's off her food at all at the moment.
I hope this answer has been helpful