Firing a phaser is different than performing surgery.
Hardly, if the surgery is conducted by a phaser.
Technicalities should rightly be ignored here. Even today, assassinations can be conducted with medical equipment; it's not a question of technology at all.
Whether Bashir is acting in the role of Kurn's doctor, Worf's friend or Starfleet soldier and law enforcer here, we don't really know, due to the profound ambiguity of the physical setting. But does that matter? We already have all the bases covered:
- We know that doctors in the UFP are not opposed to euthanasia in general, even if McCoy feels bad about jumping the gun with his dad.
- We know that Bashir is all for queer Klingon customs and mores when buddying up with Worf, even if only in order to impress Dax.
- We know that Starfleet officers, the only established soldiers and law enforces of the Federation, can and will kill people outside situations of declared war or self-defense.