First of all, instinct is something that an animal doesn't have to learn, it is hard wired already to do it. So let's talk about herding instinct, shall we? The herding comes from the instinct to hunt prey. So is certainly is an instinct. And then you have drive. That's what really pushes the dog forward and keeps it going. Instinct is sort of like the brains, where drive is the heart.
You see, it is based off of the instinct of that which the wolf uses as a pack to "herd" and single out and take down it's prey. Have you ever watched a video of wolves hunting on Isle Royal? It is amazing to see and that instinct to hunt like that, to "herd" their prey in order to single out a target, is where current herding comes from. The only difference between that and what we use in breeds like the BC today is that we use less dogs and they don't kill the prey animal, the human does instead.
Now it has been theorized that we humans did not domesticate animals, but that they actually domesticated themselves. They hung around to scavenge food. Wolves that tolerated human presence more were the ones that survived with humans and went on to produce more that would also tolerate humans. This is basic temperament too. It is believed that this initial domestication occurred over just one human life span as well. Not hundreds and thousands of years, one human life span is all it took for wolves, or a group of them, to domesticate.
If this indeed is how wolves became domesticated, then it would not be a far cry to guess that, over time, they likely chose to work with humans in taking down prey. Why would they do this? Well, they assist in "herding" the prey to a group of humans and they can take out more animals in one hunt than a whole pack of wolves. Assisting in the hunting, but allowing the humans the killing job assured the wolves that their would not only be food, but plenty of it.
Now the protection instinct stems from self preservation, defense and fight drive. It is natural for a dog to be protective of its "territory and pack" in general, if there is a perceived threat. All of this is part of self preservation ultimately. Dogs don't have to be taught to be protective as it comes instinctively to many. But I would not suggest someone go out and get a breed known for protection thinking all will be fine and the dog will attack an intruder.
So both are instincts of some degree. I don't know that you can really compare the two.
I know my Border Collie puppy, at just 8 weeks was already "turned on" to working stock. He was stalking, crouching, and flanking very nicely at just 8 weeks old. He had that intensity to work the stock in his eyes and demeanor as well. I assure you, that was instinct and I most certainly did not train a puppy, in 2 days I owned him before putting him on stock, how to do it. Instinct, all instinct.
I'm sorry, but anyone who says that herding is not an actual instinct knows nothing about herding and herding dogs and should really do some research.