Ehrler was born on 14 September 1917 in Oberbalbach, today part of Lauda-Königshofen, in the district of Tauberbischofsheim of the Grand Duchy of Baden.
From 2 November 1936 to 15 August 1937, Ehrler served with the 3./Flakbteilung 88 (3rd company of the 88th anti-aircraft department) of the Condor Legion in the Spanish Civil War.