Oh, yes. From my own long experience as a dog owner, I have many instances to illustrate this, but here is just one of them. Freya (above) was a Keeshond. Bright, engaged, friendly, welcoming, and polite — but always quietly vigilant and wise. Some people she loved, some people she liked, some people she merely tolerated, but even if she wasn’t 100% in favor of someone, her typical reaction was just to keep her eyes on them. Anytime I saw an unusual reaction from Freya, I took it seriously.
I was a well-known figure in a bustling safe neighborhood and it was not at all unusual for me to have workmen of various sorts come into my home to do maintenance or repairs while I was at work. They knew I would leave the door unlocked, the dog would bark when they entered, and they would just ignore her while they did their work and she watched them. (There was never any danger of thievery, by the way, because Freya had established a rule of her own that anybody could bring anything they wanted into my house, but they couldn’t take anything out that they hadn’t brought in unless I said so, a rule that occasionally caused some complications, but was overall not a bad idea. The workmen were all advised of this rule.)
I needed to have my carpets cleaned, so I called a friend of mine who owned a carpet cleaning company and whose workers had been in my home many times. We set up the date and I left the usual note on the door reminding the workers of the protocol with the dog and when I went to work. Later that day I received a call at work from the owner of the carpet company to say that they couldn’t do the job because my dog would not let the men in. This was weird, but I apologized and said I would stay home the following day and be sure they could come in. The next day two guys arrived as planned. One of them had been there before and he knew Freya, but the other one was a new guy with the company. Freya was instantly fierce. I have never seen her behave like this. She went full on Rambo and she made it clear that she would bite ME if I tried to let them come in, so, with a little embarrassment, I told them I was sorry, but I had faith in my dog and if she said something was wrong, something was wrong.
Needless to say, the owner of the carpet cleaning company was more than a little irritated with me, but I held my ground. All I could say was that I trusted her judgment. Maybe three weeks later, the guy called me back to apologize to me. It turns out the new guy who had come to my house had just been arrested and charged with multiple counts of home invasion and rape. He used his job to find women who lived alone that he could later attack. I have no idea how Freya knew he was a bad guy, but she did.