It is possible to maintain several accounts on one and the same server. These have to be announced to us by using a game internal function. Direct interaction between these multi accounts is not allowed. Circumventing these rules via other players is not allowed.
According to game rules, all kinds of interactions between multi accounts aren't allowed. Even those using another account in the process (Moving resources from multi to inactive account and then looting it). Violating this rule usually ends up with a permanent ban to all involved accounts.
By the way...is it an interaction if your city gets attacked and then you want to take revenge on the attacker so you attack that player with your other account? I don't mean defending the city.
If you will attack the player for revenge with your main account without involving the second account, then nothing is wrong. It is just a player attacking another player. Just take care not to defend the multi with the main account or attempt to get into battle with your enemy in one of your multies cities. Use every account independently and don't make them support each other by any means.