Yes, the USS Defiant shows that any Starfleet ship would be able to do so in Deep Space 9: For the Uniform
From the memory alpha synopsis:
Sisko then proceeds with the same strategy the Maquis had been using, he prepares to launch biogenic weapons comprised of trilithium resin at a Maquis settlement. A reversal of Eddington's weapon, the resin bomb would poison the atmosphere with a toxin that is deadly to Humans, but harmless to Cardassians. Sisko broadcasts a message revealing his intentions, but Eddington dismisses it as a Federation bluff. Sisko then orders the weapons fired, and Worf initially hesitates as he and the rest of the bridge crew are shocked that Sisko is following through with his threat. Sisko repeats his order, and Worf launches the weapons which do their job and poison the atmosphere, with Maquis transports scrambling to evacuate the settlement. Sisko announces that he plans to continue his campaign against all of the Maquis colonies in the DMZ, telling Eddington that when he attacked the Malinche the Maquis proved themselves to be an unacceptable threat to the Federation. Eddington offers to turn over the Maquis' stocks of biogenic weapons, but Sisko tells him that isn't enough. This leads Eddington to turn himself in to prevent further attacks, thus fulfilling the self-sacrificial part of his hero fantasy.
Since nearly any ship in Star Fleet is equiped with a lab, and possessing of torpedoes, they can create a similar biogenic weapon tailored to the species in question they wish to destroy.