Not made up from 'whole cloth' but copied from ancient papyrii?
Many ancient cultures used molds, soil, and plants to treat bacterial infections. In Ancient Serbia, China and Greece, old moldy bread was pressed against wounds to prevent infection. In Egypt, crusts of moldy wheaten bread were applied on pustular scalp infections and “medicinal earth” was dispensed for its curative properties. These remedies were believed to influence the spirits or the gods responsible for illness and suffering. Today we know that the occasional efficacy of these early treatments was due to the active metabolites and chemicals present in these concoctions.
— Antimicrobial Resistance Learning Site — Ancient Times
Ancient Egyptians did not know about microorganisms but they knew that honey, moldy bread and copper salts could prevent infections from dirt in burns healing.
— Burns treatment in ancient times. (Med Pregl. 2013 May-Jun;66(5-6):263-7.)
Although ancient Greek and Roman medicine is generally considered the origin of European medicine, there is evidence in ancient Egyptian texts suggesting a precursor role of ancient Egyptian medicine in this regard. What did Greek and Roman physicians learn from their Egyptian counterparts? Of the medical papyri discovered to date, the largest and most significant – the Ebers papyrus and the Smith papyrus – originate from the beginning of the New Kingdom, however, they were – at least in part – already written during the Old Kingdom. Considering the times, the spectrum of diseases treated as well as the range of conservative and surgical treatment methods was truly astounding.
Moldy bread was used for purulent wounds and can, in a way, be regarded as the first kind of penicillin due to the antibiotic substances later found therein.
— Anke Hartmann: "Back to the roots – dermatology in ancient Egyptian medicine", Journal of the German Society of Dermatology JDDG, Vol 14, No 4, pp 389-396, 2016.
Galen used moldy bread to treat surgical wounds, and that not only because it may contain antibiotics suppressing the growth of pathogenic bacteria. Some of those fungi appear to do excrete penicillin like substances and directly promote wound healing.
The curative properties of mould are also referred to in ancient herbals; in 1760, for example, an English herbalist stated that mouldy bread was useful in facilitating the healing of wounds, while in 1640 John Parkington, a London apothecary and the King's herbalist, advised that moulds might be successfully applied to wounds.
Reference is also given to a mould cure in the Jewish Talmud, it was called kutach bayli or chamka, and consisted of a mash of mouldy corn soaked in date wine. The curative properties of moulds are also referred to by the Ancient Egyptians in the Papyrus Hearst (prescriptions 89-92), assigned to the Eighteenth Dynasty (1500 BC)." Intriguingly, residues of tetracyclin (an actinomycete antibiotic) have been found in recently unearthed bones of members of the X-group of Sudanese Nubia (AD 40), suggesting that these people, either by accident or on purpose, consumed mouldy grains, to gain therapeutic benefits.
Yeasts too have been used as curatives since antiquity, both internally for the treatment of boils and as poultices to treat ulcers. Fresh yeast was also extracted with alcohol to form Extractum Cerevisiae, Fermentior Faexin Extract, which was used in the treatment of boils, acne, etc.
— Milton Wainwright: "Moulds in Folk Medicine", Folklore, Vol. 100, No. 2 (1989), pp. 162-166.
Some of the more 'exotic' looking recipes listed in European medieval books:
Some recipes seem bizarre at first, but upon closer inspection prove to be not so odd, after all. The God-fearing chemists smeared a paste of cheese mold, soft sheep dung and honey onto "boils on the lower legs." "We will never conduct a clinical study of this," says Mayer, smiling, "but it's plausible that an antibiotic could arise from this mixture."
– Samiha Shafy: "Looking for Medical Miracles in Medieval Manuscripts", Spiegel, 25.03.2010.
While a modern fiction writer is free to invent anything he likes, on this one it seems more plausible that Martin just did what anyone in the history of medicine ever did: he just took what was available and applied it. From early on and whether 'high' or 'low' medicine, folklore or canonised medicine, applied by peasants, witches or doctors and monks in monastic medicine, molds were used on wounds.
The doctors of the Middle Ages reacted as their modern colleagues would react: Bleeding was stopped, either with a tourniquet or with needle and thread. "The surgical suturing techniques used were largely equivalent to today's techniques for stopping bleeding," explains Keil. In order to treat wound infections, moulds were cultivated on special culture media containing honey and sheep droppings, among other things. The doctors scraped off the fungi and introduced them into the wound. Keil: "For this you have to know that certain moulds produce penicillin. Wound infections were therefore already treated with penicillin in the Middle Ages, even if the substance itself was not yet known. Mainly wound doctors were responsible for bloodletting at that time. However, in some cases Bader also performed the procedure. "Patients were quite happy to go for bloodletting," said Keil. "First they were bathed for several hours, then the bloodletting followed. That was obviously quite pleasant."
— Gundolf Keil, interviewed on Aus der Forschung - Archiv 2006
Note the until recently a lot of medieval recipes were derogatorily and wholesale called "Dreckapotheke" (pharmacy of dirt). But the earliest example of this is the Lorscher Arzneibuch (Codex Bamberginsis medicinalis 1 b), written around 788–795. Already this Carolingian book uses the same techniques as the Papyrus Ebers, namely growing moulds on sheep droppings and bread to treat wounds with the harvest from these. Extracts from these now proven to contain antibiotic substances.
— Gundolf Keil: "Der Papyrus Ebers und die Medizin des Abendlandes" (PDF)
— Reinhard Wylegalla: "Arzneien aus dem Mittelalter", in: Deutsche Apotheker-Zeitung. (8) 2010, p. 88.
The most remarkable thing about this are the underlying theories that explained these techniques: an open wound would allow evil spirits to enter the body, so it might be mandatory to scare those spirits away with yucky stuff. Not that it always worked to satisfaction and without sometimes horrible side-effects. Like secondary infections etc.
This is not to say that medieval medicine is better than modern medicine. But it is not to be dismissed. Especially if you want to know a way to treat multi-resistant Staph A (MRSA). We have a hard time now to control this pathogen. One remedy against it is 1000 years old.
But if you have a thing that works, and a nice scientific theory that explains the 'why', you have exactly what modern medicine has.