Yes. During my school years, I suffered acute tonsillitis (purulent tonsillitis). At some point, the temperature rose to 40+. At this point, I saw glitches, but I remember being clearly aware that this was not real.
There is no need to confuse cause and effect here. Hallucinations can occur at high temperatures, but this is not due to fever.
Let's figure it out. With a severe course of infectious and inflammatory diseases (flu, pneumonia, measles, enterovirus infections, tonsillitis, etc.), a huge array of microorganisms multiply and die in the body. When their cells are destroyed, a large amount of toxins are released. If detoxification therapy is not carried out (drinking plenty of fluids, intravenous administration of isotonic solutions) or the body's excretory system suffers (renal failure is observed, old or childhood age, exhaustion, low blood pressure - which makes it difficult for the kidneys), then a huge array of toxins accumulates in the body , gets into the brain and disorganizes the work of neurons. This is accompanied by convulsions, hallucinations, delirium. That is, there is a banal poisoning with these toxins. At the same time, these toxins irritate the thermoregulatory center, which greatly increases the body temperature.
Thus, hallucinations do not occur DURING or DUE to high temperature, but TOGETHER with high temperature in severe infectious and inflammatory diseases. It would be more correct to ask: "Can hallucinations appear in infectious and inflammatory diseases?".