Both sides had the option. Neither side used it.
It was a bit like the cold war. The US and the USSR during The Cold War both had atomic bombs. Though they came close, during the Cuban Missile Crisis, to using them, neither side did (fortunately.!)
I saw a photo recently of a prototype plane planned for use over Britain's coastal defences, on the beaches. They converted a Lysander by adding a Lancaster bomber's tail and turret and it was supposed to be able to spray the beaches with machine gun fire and drop poisonouse gas too.
That was never used either.
This is Wiki on Poison Gas in WW.11.
Nerve gas was also available to governments in World War Two. One of the first to be developed was Tabun by German scientists. Nerve gases attack the body’s nervous system. The symptoms are nausea, vomiting, muscular twitching, convulsions, cessation of breathing and death. Sarin and Soman were also developed as nerve gases. Of the three nerve gases named here, Soman was the most deadly. From inhalation, it is only a matter of seconds before a victim goes into convulsions. The US Army Manual TM 3-215 estimated that a victim of Soman would be dead within two minutes.
There is no doubt that most protagonists in World War Two had stockpiles of poison gas. By 1945, the Germans had 7,000 tons of Sarin alone – enough to kill the occupants of 30 cities the size of Paris. The Americans also had sizeable quantities of poison gases stockpiled. Britain experimented with anthrax on remote Scottish islands to see its impact on the animal population there. All countries that possessed poison gas in any form also had the potential to deliver it on an enemy.
With such potency and the ability to change the course of a battle why wasn’t poison gas used – even as a last resource? It would appear certain that the fear of retaliation was the reason and the fear that the enemy may well have developed a poison gas more virulent that anything the other side had. So in a war where atomic weapons were used, napalm, phosphorous, unrestricted submarine warfare etc, where civilians were seen by some as legitimate targets, no side was prepared to risk using a weapon that had been so feared in World War One.