I don't know that they understand the difference between accident/on purpose and what it is to apologize. But I definitely think they can sense our emotions and they can smell our body changes - I think a dog can tell the difference if you are angry or if you're sorry for something that happened.
Hugs make everything better.