Sure. Again, this is where the mechanism matters. There are plenty of things that kill viruses; you have to be able to deliver it in a useful way that doesn't kill the patient.
As XKCD points out, a handgun kills cancer cells in vitro. https://xkcd.com/1217/