Born in Murray Bridge, South Australia, on 18 February 1923, Dunstan joined the Australian Army and was accepted into the Royal Military College, Duntroon in February 1940 amidst the backdrop of the Second World War. A career officer, after graduating from Duntroon in June 1942, having completed a cut-down 18-month version of the normally four-year course, Dunstan was allocated to the infantry and posted to the 27th Battalion, a South Australian Militia unit known as the South Australian Scottish Regiment. He subsequently served with the 27th until the end of the war, except for a brief period when he was seconded to headquarters 23rd Brigade.