First of all animals can consent. But their way of communicating that is not saying "Yes please have sex with me." accompanied with a written and verified form so you can not sue each other 25 years later.
Animals communicate using body language and a limited set of vocalizations.
A dog might not consent, but he can express "want".
How is that different from a consent? At the moment the animal wants something and is willing to receive it, the animal is consenting to it. For example if a horny dog mounts a female dog out of heat, he is going to get shaken off and yelled in his face by a pissed off female dog. That is a female dog expressing not-consent.
If the same dog does that in heat and the female decides that this dog can have sex with her, she is actually actively going to help him get things in the right place. That is a female dog expressing consent.
If consent works between the animals themselves, you can extend that concept to humans as well.
If a human understands the same body language, you can understand when an animal wants to have sex with you and therefore you have the animal's consent. But at the same time if you attempt that without consent, you are going to get yelled in the face and since you are not fast enough, you might get bitten.
Flagging (normally they do this behavior in standing heat) is how a female dog expresses that she is willing and ready to mate with a male, lifting of the vulva and tucking the tail off to one side are clear signs of consent, it is part of the k9 body language, they are absolutely capable of...
www.zoovilleforum.net
If you have sex with your girlfriend, do you ask her every single time: "Do you want to have sex with me?" and do you get her verbal consent every time? Or does it rather work based on body language and mutual understanding of what is going to happen and you do not really need to clearly verbally express your need (that is what being horny is) and the consent is understood mutually from the behavior?