The US Manual for Military Commissions (2007) states: “Lawful enemy combatant” means a person who is:
A) a member of the regular forces of a State party engaged in hostilities against the United States;
B) a member of a militia, volunteer corps, or organized resistance movement belonging to a State party engaged in such hostilities, which are under responsible command, wear a fixed distinctive sign recognizable at a distance, carry their arms openly, and abide by the law of war; or
C) a member of a regular armed force who professes allegiance to a government engaged in such hostilities, but not recognized by the United States.
I would link to a primary source, but they're all PDFs. So, this is from the Red Cross. There are additional requirements, but openly carrying arms is a big one.
https://ihl-databases.icrc.org/fr/customary-ihl/v2/rule3
edit for formatting