Of course. Doesn't mean yours was right. If someone is acting in a way that is not good for you, the way to deal with it is talk to them. Not spy on them.
Both are wrong, and a relationship would be hard to manage at this point since both of you have broken trust.