If the dog is allowed to inhale large amounts of undiluted tea tree oil then it can become toxic to dogs.
But when a dog breathes in or smells small amounts of diluted tea tree oil it's not toxic to the dog.
I've used tea tree oil diluted with some water to kill fleas and ticks on my dog and it works great and has never harmed the dog.
The tea tree oil becomes toxic to dogs when breathed in large amounts and in high concentrations when it's undiluted.
But diluting the tea tree oil before putting it on your dogs skin lowers the strength and concentration of the tea tree oil.
So it becomes less harmful to your dog.