The short answer is Yes.
Here's some additional information:
IFF is used by both military and civilian aircraft. Modes 1, 2, 4 and 5 are for military use only. Modes 1, 2 and 3/A are collectively known as Selective Identification Feature (SIF) modes.
Civilian aircraft use modes 3/A, C and S. Mode C which includes barometric pressure altitude information is often used in conjunction with mode 3/A.
Mode S is a new civilian mode developed to replace both mode 3/A and C.
SIF modes are used to determine friend or foe.
Thank you.
L