But that wasn't the point. The whole reason why half the natives had guns was because the Klingons gave them to them. According to the PD (at least my interpretation of it), the Federation should have done nothing. It's not their fault that the Klingons contaminated Tyree's people, and they were not obligated to do anything about it because Tyree's people were not members of the Federation.
Good grief, it's not about whether it's their fault. It's not like they're afraid of a lawsuit and trying to cover their asses. Kirk's concern was for Tyree's people, not his own. The Prime Directive, as it was interpreted in the TOS era, was about protecting other cultures' right to free choice and self-determination. And that meant that the Federation couldn't impose its own values and laws on another society, true, but it also meant that they could intervene to prevent someone else from doing so. If the society was already being interfered with by aliens, then it was justifiable to interfere in order to cancel out that interference. At least, that's how Kirk interpreted it.
If the Klingons had been left to their own devices, they would've used the villagers to conquer the planet and then get themselves invited in as its rulers, and ultimately the whole species would've been under alien subjugation. The idea was that arming the Hill People created a level playing field and prevented the Klingon sympathizers from conquering the whole planet. Which was the only way Kirk could see to stop the Klingons from subjugating the world, short of open war with the Empire.
Now that both sides had guns, it could have caused both sides to destroy each other instead of only one side destroying the other.
Is that realistic? We've had guns for centuries, but it's never led two warring cultures to totally destroy each other. We came close in WWII and occasionally during the Cold War, but even then, we had alternative methods such as diplomacy and international law to create checks on unfettered warfare.
If one side has superior firepower, it can run roughshod over its enemies, but if it loses its advantage, that gives it a reason to hold back, to avoid attacking for fear of being attacked itself. Kirk's intent was to create a deterrent by ensuring that neither side ever had a clear advantage in firepower. A balance of terror, like that which prevented us from launching a nuclear war during the arms race. (The reason the Romulan episode was called "Balance of Terror," presumably, was because the development of the cloaking device and plasma weapon by one side threatened to overturn that balance and lead to war.) There would be armed conflict, yes, but neither side would be stronger than the other, so both sides would survive.