technically speaking, using the dog's hair (better would be a tooth, or its blood) is invoking sympathetic magic as trope in a story where you make the dog pay a debt - that absolutely is a mechanism that's consistent in a magical worldview
using ill-understood chains of causality is how we do most things, including ones with explanations in materialistic world views, you don't get down to an atoms-and-forces level of understanding when you lift a cup of coffee to your lips