It's probably a shock collar they're wearing that is activated when they're near the rattlesnake. And yes, they will associate it with the snake. When you get an underground electric fence to contain your dog, you put little flags around the boundaries of your property. The dogs soon learn that going near the flags causes a shock.
no subject