This "under arms" business isn't followed in the UK or Canada. Military personnel are bareheaded in church.

I can, though, think of two exceptions. Her Majesty's Bodyguard of the Honourable Corps of Gentlemen at Arms and The Queen's Body Guard of the Yeomen of the Guard wear their helmets and bonnets respectively when on duty in church. It is quite possible that The Royal Company of Archers, The Queen's Bodyguard for Scotland wear their bonnets in church whilst on duty.