Let me clear things up:

Rushing: Killing someone without their consent, or if they didnt say "go". So if someone rushes you, you technically are rushing back unless they wanted you to fight back.

Teaming: When a greater quantity of players are using skills(Healing and Debuffs only count too) against a smaller group of players. Considered rushing the majority of the time unless the person being ganged up against agreed to one 2v1 fight.

FFA-Free-For-All, do what ever you'd like, most people fight. Not rushing since when you join a FFA game, you either agree and stay or disagree and leave. IMO, when you join a FFA game and noone says FFA before you are killled, you did not assent with FFA, and therefore it is considered rushing. Note that sitting is not a rule, just a manner. So in some cases teaming=FFA since everyone is doing whatever they like. If the person doesn't like this type of FFA, he can just leave. Killing someone who is sitting though, is rushing


So I can think of 2 scenarios:
a) This is a FFA game where your friend needed help against teamers. You are not rushing but participating in FFA..
B) Your friend is genuinely being rushed/teamed. The other side did not agree to you fighting so yes you are rushing. But for a good cause

Either way, you weren't doing anything morally wrong or anything against TOS. FYI IRL, watching someone get killed without helping to the extent of your abilities is considered second degree murder.