If you’re aware the person wouldn’t want you to do that, yes it’s wrong. Being able to do something is not the same as it being right to do something.
Being able to do something, even if you can do it without the police showing up, is not the same as it being right to do something.
I think it’s wrong to cheat in a relationship but it’s probably legal.