It's just another tactical situation for Bashir. When treating Kurn's wounds, he's Kurn's doctor. When erasing Kurn's memory, he's not. "Enemy" or "target" is not a moral assessment: it's something an officer accepts as part of mission specs.
And in this case, the mission was to deal with Kurn's desire to die, Worf's desire to manage the social standing of the sons of Mogh, Sisko's desire to regulate (not
ban outright) his officers' murderous activities, and a host of other related concerns. Whatever moral considerations there were, they were not medical ones, and Bashir did not need to wear his medical hat for this.