The man mixed in with a group of recruits as they headed to their base in the southern city which serves as a temporary capital for the government, the official said.
Army and government installations have been the target of several attacks by extremists since pro-government forces drove out Shiite rebels in the summer.
Al-Qaeda and the Islamic State group have taken advantage of the chaos caused by the war between the government and the rebels to strengthen their grip on southern Yemen.