Under extreme conditions, live maggots may be inserted into a wound to consume damaged or diseased flesh, according to a medical manual for U.S. Army Special Forces (large pdf).
“Despite the hazards involved, maggot therapy should be considered a viable alternative when, in the absence of antibiotics, a wound becomes severely infected, does not heal, and ordinary debridement [removal of diseased tissue] is impossible,” according to the 1982 manual (at page 22-3).
See “U.S. Army Special Forces Medical Handbook,” ST 31-91B, 1 March 1982 (407 pages, 16 MB PDF file).
It turns out that maggot therapy is recognized and regulated by the U.S. Food and Drug Administration. Sterilized maggot colonies can be ordered, by prescription only, from specialized suppliers.
The Special Forces manual, however, envisions the use of unsterilized maggots for emergency use.
Along with a lot of standard wilderness medicine, the manual also describes various unorthodox, potentially dangerous remedies that may be considered when conventional medical alternatives are unavailable.
For example, the manual suggests that intestinal worms can be combated by eating cigarettes. “The nicotine in the cigarette kills or stuns the worms long enough for them to be passed.”
Another option for dealing with intestinal parasites is to swallow kerosene. “Drink 2 tablespoons. Don’t drink more.” (page 22-2).
Update: But see also “A Caveat on the Special Forces Medical Manual.”