Azula won the Agni Kai - she would only have been disqualified if Katara had actually been hit with the lightning. Therein lies the strength of the moment - Zuko was forced to choose between winning the Agni Kai at the cost of Katara's life, or sacrificing himself to save her. He made the right choice - the epitome of the incredible character changes he has gone through. But Azula won.
Of course if Azula had been sane during the fight I remain dead certain that she would have been able to triumph without trickery.
Azula's victory can be compared to a game of tennis. If one of the players hits the ball and it is going out, but for some reason the other player hits it back in before it can go out, the ball is not out. The fact that the ball would have gone out if the other player hadn't interfered is irrelevant - because he chose to hit it back in the ball is still in play, and if the player who originally hit the ball ends up winning the point, that is the fault of the other player who was stupid enough to hit it back in when it was going out.
So Azula won - she did so by forcing her opponent to choose between two bad results. Even though her opponent was stronger, she was smarter.