After writing that, I decided to check a dictionary. This is how a web page from Collins Dictionary puts it.
"If someone who is involved in an argument or dispute has behaved in a way which is morally or legally wrong, you can say that they are in the wrong.
'He didn't press charges because he was in the wrong.'
Synonyms: guilty, mistaken, at fault, off course"