My dog is scooting on its backside and I think it has worms

Anal sac disease in dogs
Many veterinarians are presented by concerned pet owners about the animal’s scooting or dragging their backsides along the ground by holding the back legs up in the air and pulling themselves forward by the front legs whilst remaining in a seated position. The owner often thinks that the animal may have worms and is trying to get the worms out their backside by dragging it along the ground. Although this is quite possible to be the case, especially in the case of tapeworm infestation, it is unlikely to be the cause. The most common cause for this behaviour is uncomfortable anal glands.
A sugar substitute fit for humans, which can be lethal to your dog

Xylitol Toxicity
What is xylitol and where can it be found?
Xylitol is a natural sugar alcohol that is commonly used as a sugar substitute in human foods. It is found in and extracted from corn fiber, birch trees, hardwood trees as well as other fruits and vegetables.
Xylitol is a sugar substitute most commonly found in chewing gum, candies, breath mints, baked goods, cough syrup, children’s edible vitamins, mouth wash and tooth paste (all of the sugar free variety). There are many more human products on the market that may contain xylitol. It may also be purchased in a granulated form to be used for baking, or as a sweetener over cereals and in beverages. As society’s pressure to look lean and slim, and the need to diet increases, this sugar free alternative has grown drastically in popularity over the last decade.
What is trichobezoar?

Hairballs in cats
The elusive and very unpleasant hairball is something that every cat owner will experience at some point. Cats in general are very clean and well-kept animals and grooming is an essential routine for them to ensure their cleanliness. A healthy cat is one that grooms. Hairballs are simply a by-product of your cat’s hygiene.
A trichobezoar, commonly known as a hairball, is a clump of indigestible hair, moistened by bile and digestive fluid that may or may not contain bits of food or other foreign material. Hairballs are not usually round in shape but rather drawn-out and the shape of a sausage. This is due to their passage through the oesophagus, the tube connecting the stomach to the mouth, which is long and cylindrical. Hairballs can occasionally resemble faeces but on closer examination one will notice it is made up of hair. It also does not smell like faeces although it does not have a particularly pleasant odour.