You can't obtain the Legionaire Armor to relase him, but you do want to do what is above.
Talk to Fraila to complete the 'Missing in Action' quest. Now you released Thorald without having to kill the Thalmor. Don't worry, as the Thalmor will still become unhostile for the rest of the gameplay. then he'll follow you all the way outside. He'll lead you inside the keep and you need to talk to Thorald to tell him he'll be rescued. Talk to the Thalmor at the front gate and persuade him to release Thorald Grey-Mane and give him the Imperial Orders. This will cause the Thalmor at Northwatch Keep to become unhostile. He will give you the Imperial Orders you need to give to the Thalmor at the front gate. Talk to General Tullius in the Castle Dour in Solitude to release the prisoner at Northwatch Keep.
What you'll need to do is join the Imperial legion and you need to start the rescue quest. But however, there is another way to release Thorald without bloodshed. You can't obtain the Imperial Legoinaire Armor as it doesn't exist.