The Spanish ruler Abd al-Rahman III, Emir of Cordoba 912-929, and Caliph of Cordoba 929 to 961, had a problem.
His mother was a Christian slave from northern Spain. His paternal grandmother was a Christian princess from northern Spain. So he didn't look much like a stereotypical Arab leader.
He is described as having "white skin, blue eyes and attractive face; good looking, although somewhat sturdy and stout. His legs were short, to the point that the stirrups of his saddle were mounted just one palm under it. When mounted, he looked tall, but on his feet he was quite short. He dyed his beard black."[17]
https://en.wikipedia.org/wiki/Abd_al-Rahman_III#Early_years[1]
So he dyed his beard black to look more like an Arab.
Of course he was a lot richer than a typical European monarch, to say nothing of a typical European commoner, and materials which were cheap in Spain might be expensive in Britain.
People did dye their hair in medieval Europe.
I find it hard to believe that people with red hair would be certain to be lynched as witches in medieval Europe. If every European with red hair would be lynched for a period of several centuries in medieval Europe, the genes for red hair would have become almost extinct and almost no Europeans would have red hair today.
Red hair (or ginger hair) occurs naturally in one to two percent of the human population, appearing with greater frequency (two to six percent) among people of Northern or Northwestern European ancestry and lesser frequency in other populations. It is most common in individuals homozygous for a recessive allele on chromosome 16 that produces an altered version of the MC1R protein.1
https://en.wikipedia.org/wiki/Red_hair[2]
Red hair is most commonly found at the northern and western fringes of Europe;3 it is centred around populations in the British Isles and is particularly associated with the Celtic nations.3
Ireland has the highest number of red-haired people per capita in the world with the percentage of those with red hair at around 10%.5
Great Britain also has a high percentage of people with red hair. In Scotland around 6% of the population has red hair; with the highest concentration of red head carriers in the world found in Edinburgh, making it the red head capital of the world.[6][7] In 1907, the largest ever study of hair colour in Scotland, which analysed over 500,000 people, found the percentage of Scots with red hair to be 5.3%.[8] A 1956 study of hair colour among British Army recruits also found high levels of red hair in Wales and in the Scottish border counties of England.[fn 1][9]
https://en.wikipedia.org/wiki/Red_hair#Northern_and_Western_Europe[4]
So your character is lucky to live in a fantasy society which resembles the world world region where red hair is most common and most taken for granted.
Throughout the Middle Ages, marital status was shown by whether a woman's hair was covered. Unmarried women and young girls wore their hair loose and uncovered. Sometimes they would wear braids or plaits. Married women and widows, however, were held to a greater degree of modesty and required to keep all hair covered in public. Their social status and financial status was shown by their headdresses and accents, such as silk or gold thread or ribbon. Loose hair on a married woman would lead to accusations of low morals or even witchcraft.
https://hair.lovetoknow.com/alternative-hairstyles/womens-medieval-hairstyles[3]
. For a woman to have walked the streets of a medieval town with her hair uncovered would have invited suspicion as to her sexual morality—that was the behaviour of a prostitute. (In fact, if an “honest” woman from the French town of Arles saw a prostitute wearing a veil, she had the legal right to rip it off.)
https://yvonneseale.org/blog/2016/10/09/the-veil-in-the-middle-ages/[5]
So your female character may be protected by living in a region where red hair is more common and more accepted than anywhere else in the world, and by covering up her hair in public if she is a married women or a widow. And although it was rare to marry very young in the Middle Ages, there were probably enough examples of young wives and young widows that a girl with her hair covered would not seem too strange.
But maybe your fantasy world differs from the real middle ages and red hair is very rare - and thus suspicious - where your character lives and women usually go barehead. And maybe her superior knowledge you mention might make people suspect that she is a witch.
So she should dye her hair blonde or dark to avoid looking red haired, and also find a reason to cover up her hair despite that not being customary, so that patches of hair she missed dying wouldn't be noticed. She could become a nun and keep her hair covered if that is a thing.
If the cheapest dye materials she can find are for unnatural hair colors, she might try to start a fashion to dye hair bright green, or blue, or purple, or an unnatural fire engine bright red which everyone will know is obviously a dye job, and no one will suspect her hair is actually naturally reddish.
And possibly she could wear a hat, scarf, or helmet covering her whole head, with a face mask or a veil covering all except her eyes, and tell people that is to hide the horrifying scars from her terrible accident or disease.