If you dream of a dog that you own, know, or was friendly to, and it suddenly bites you, the meaning can be found in the idiom below.
The dog that bites the hand which feeds it is a modification of an idiom to describe an ungrateful person who does an act of perjury to their benefactor. For example, we may feed domestic pets but the animal may turn against us and bite us. Sometimes, the aggression is caused by illness, irritation, violation of its boundaries, rabies or some other reason. Humans who turn against their helpers are described as ungrateful and biting the hand that fed them.