The M-16 (mostly phased out) and the M-4 are direct variants of the AR-15, in rifle or carbine configurations, respectively, with fully automatic, 3-round burst, and semi-auto (as is the AR-15) capabilities depending on the submodel and branch of military.
That said, I’m sure an AR-15 has been used in war by civilians, rebel groups, or contractors as mentioned by others.