He was, for the first few years of the war. His wikipedia article has the details of his wartime career. You're probably thinking of "A Piece of Cake", which was his first published story and based on a plane crash he'd been in in 1940.
You are right, he was a fighter pilot but was injured and ended up in Canada and America doing diplomatic/intelligence work.