Gowron was the legitimate government, recognised by the federation.
Gowron asked federation help in dealing with what, legally, were terrorists.
Picard refused due to the prime directive, NOT the treaty (Gowron's request strongly implied the treaty allowed for the federation to help the klingons in internal matters, at their request).
And the prime directive - you can't involve youself in internal matters of a culture, but you can interfere in this culture's relations to political actor X (despite the fact that you're not a paricipant in these relations)?
A harebraind distiction
"Picard saved the day only because the romulans acted equally opaque:
One wonders why, after Picard&co found the romulans, Sela didn't say:
"You found me. Big deal. I just returned from your ship, Picard. You know nothing you didn't already know.
This changes nothing - this is not hide and seek; I have no reason to return just becase you see me.
If you have the balls, open fire.
If not, get out of my way. I have a war to win. And, when I'm done, I'll come with my new klingon pals and start taking federation worlds apart.""