But the man at the gun store said that a person under 21 is not allowed to own or be in possession of a handgun.
IL state law.
I was always told that being under 21 only meant that you could not buy a gun from an FFL dealer.
You have to obey both, and it appears that you must be 21 to have an IL FOID card or have your parents sign
(430 ILCS 65/4) (from Ch. 38, par. 83‑4)
(Text of Section from P.A. 97‑158)
Sec. 4. (a) Each applicant for a Firearm Owner's Identification Card must:
(1) Make application on blank forms prepared and
furnished at convenient locations throughout the State by the Department of State Police, or by electronic means, if and when made available by the Department of State Police; and
(2) Submit evidence to the Department of State Police
(i) He or she is 21 years of age or over, or if
he or she is under 21 years of age that he or she has the written consent of his or her parent or legal guardian to possess and acquire firearms and firearm ammunition and that he or she has never been convicted of a misdemeanor other than a traffic offense or adjudged delinquent, provided, however, that such parent or legal guardian is not an individual prohibited from having a Firearm Owner's Identification Card and files an affidavit with the Department as prescribed by the Department stating that he or she is not an individual prohibited from having a Card;
In your case, the more restrictive state law sets the bar.