Okay, okay - I have done a bit of research and realise that chemical warfare is almost certainly not the cause (or could it be?), but this family story has bugged me for years.
My great-grandfather died when I was a young child in the mid 1980s. I clearly remember being told that he lost his sense of smell "due to being gassed in the war". I took this as fact and carried it with me as part of my family story, until I was in my mid 20's when a friend pointed that there was no evidence of chemical warfare being used on allied forces. Hmmm.
My great-grandfather never spoke directly about his experiences, so any stories were potentially a mixture of fact and fiction. But he definitely lost his sense of smell, this is fact. He definitely fought in North Africa for the British army. Everyone in the family that I could ask about this is now dead, so I'm left scratching my head.
[Edited to add British army]
Anosmia or loss of smell is not that uncommon condition, as modern research suggests that it is diagnosed in 2-4% of the adult population in USA and Western Europe and is likely to show similar occurrence in other regions, so it isn't that rare for people to just develop such condition due to various factors.
The most common cause of anosmia is a viral infection of the upper airways that may result in the chemesthesic alterations (changes in the sensitivity of mucosa and skin to various chemicals), what might take form of decreased sensitivity of smell (although heightened or altered sense is also a possibility). This is quite closely associated with acute conditions caused by rhinoviruses and coronaviruses, with the present SARS-CoV-2 pandemic being possibly the best known example. It is also worth noting that the permanent complication might not be related to a severity of the illness, making it harder to pinpoint the actual case by the affected. In addition, various conditions related to the same area, such as e.g. sinusitis might result in a loss of smell. Aforementioned conditions are very common and travel to a distant area (such as another continent) might increase a chance of exposure to a strain one is not immune to. There is a possibility of developing the latter due to other conditions, especially neurodegenerative ones, such as Parkinson's Disease, Alzeimer's Disease or multiple screrosis, but I assume we can exclude these considerations in this particular case. Loss of smell can be also a result of a physical injury to the facial region or serious concussion. Such cases are rare, but not unheard of.
We can't of course, exclude actual damage of the olfactory field or pathways due to toxic chemical agents that might not need to be associated with chemical warfare. Compounds created during the combustion of the explosives and propellants are not necessarily healthy, and although they are readily dispersed in an open space, it is possible that they might have an adverse influence when the exposure is high enough (in case of e.g. machine gunners, especially those operating in confined spaces, such as bunkers or airplanes - Bohdan Arct, WW2 airman, recalls in his memoirs a nose gunner who started to become sick during the missions and only after some time he noticed that the hose in his oxygen mask was damaged, causing his to inhale the fumes). This also applies to various volatile compounds contained in chemicals, such as liquid fuel, paints, solvents etc. Between the relatively lax approach to safety in the 1940s (at least when compared to modern regulations by OSHA and equivalent institutions) and deliberate or incidental lowering of safety standards due to frontline conditions, such exposure to harmful substances might have been a factor. Daytime North African conditions, with its notoriously high air temperatures and airborne fine sand could have also exacerbated the latter problem.
Last but not least, soldiers were not unlikely to inhale various toxic substances in the combat zone, chiefly caused by various forms of fire. In addition, white phosphorous, commonly used used in smoke rounds during Second World War and the following decades, creates e.g. phosphorous pentoxide, a very powerful irritant that can potentially cause damage to nasal mucosa and associated complications. In case of gas mask malfunction or prolonged exposure to the compound even in small concentration (present even after the smoke visibly disperses and soldiers are likely to take masks off) can also eventually lead to the damage of the sense of smell.
So, to sum it up, loss of smell is uncommon, but not that rare condition and given the circumstances, it could have been caused by an illness, injury, a exposure to various common chemicals (let's assume that smoke screen is common in a military setting) or a combination thereof.