Scientists in Kyoto University in Japan did an experiment with more than fifty dogs and owners to test out if dogs avoid people who behave negatively to their owner(s). They found that dogs were less likely to accept food from those who had a rude response to their owners request for help. Scientists found that dogs are able to identify an emotional shift in their owners and if it was a negative shift these dogs would begin to feel stress but not necessarily a grudge.
A deep feeling of resentment towards an individual or situation due to a previous memory.
This deep-seated emotion is usually caused by our ability to recall an episodic memory. Our ability to remember the specific moment our feelings were hurt is what separates us from our animals. This is not to say our animals are unable to remember negative experiences - they do.
Dogs and cats have a strong associative memory, giving them the ability to learn and remember the relationship between unrelated items. For example, when your animal goes to the restroom in the designated spot they receive good praise and treats (positive association - X↑ and Y↑) but if they go where they are not supposed to they receive your disapproval and discipline (negative association - X↑ and Y↓).
Negative associations manifest stress triggers in our animals and in result are what usually lead us to project our emotions like 'holding a grudge' onto them. Change in their body language, that indicate they are stressed and unhappy resemble:
Stiff Body accompanied by intense focus.
In those moments that we believe our animal is 'holding a grudge' we may need to step back:
Note the situation;
Recognize if your dog has a positive or negative association with this situation;
If this is a negative association - reflect on creative ways to flip it to a positive association (for example, if your dog is scared of the mop and consistently barks at it. Take the time to expose them to the mop and its purpose while asking your dog to "leave it". When they don't bark or react they receive their favorite treat).
Be sure you're not projecting, it's so easy for pet owners to allow their guilt to shine through onto their animals. I know it's not just me who feels guilty leaving for work only to come home and not have the energy to play with my dog. I then find myself believing that my girl is sitting at home bored and upset with me. To ease that guilt and projection I plan times to take her out for our scheduled walk or game of fetch. Bonding with your pet(s) is one of the most beautiful feelings on earth, so understanding the way the process situations is essential.