Your parents can file AOS (I-485). The lawyer is wrong, but the USCIS person you spoke to is not entirely correct either.
What the lawyer may be thinking of is the fact that in most categories, one is barred from Adjustment of Status if one is out of status at the time of filing (See USCIS Policy Manual, Volume 7, Part B, Chapter 3). For the purposes of this bar, a pending application for Extension of Stay or Change of Status does not count as having status. "Illegal in the USA" is not well-defined in the law, but perhaps the USCIS person was trying to say that they are not accruing "unlawful presence" for the purposes of the 3-year/10-year unlawful presence ban while they have a pending Extension of Stay or Change of Status. But "unlawful presence" is not what's considered for the eligibility for AOS; as section D points out, there are period of authorized stay for which one is not accruing unlawful presence, but is not considered to be in lawful status for the purposes of AOS.
If your parents were in a category where they are barred from AOS if they are out of status (they are not, but we will get to that in a second), and they file I-485 after their status expires and while an Extension of Stay or Change of Status is pending, section E-1 describes that USCIS does defer adjudication until approval of the Extension of Stay or Change of Status. This is not exactly what the lawyer said (he said they cannot file, but actually they can file and they will defer adjudication), but also not exactly what the USCIS person said (he sounded like they are definitely eligible, but in reality the eligibility still depends on the EOS/COS approval).
However, your parents are in the Immediate Relative category (spouse, parent, or unmarried under-21 child of US citizen). People in this category do not need to be in status at the time of filing AOS. As long as they entered legally, they could have overstayed their status for years, and they would still be eligible to file I-485 as normal, without needing any waivers or any other special procedure. As described in USCIS Policy Manual, Volume 7, Part B, Chapter 8, section B:
Certain adjustment bars do not apply to an immediate relative,
including the spouse or child (unmarried and under 21 years old) of a
U.S. citizen, and the parent of a U.S. citizen older than 21.
An adjustment applicant applying as an immediate relative may be
eligible to adjust status even if:
The applicant is now employed or has ever been employed in the United States without authorization;
The applicant is not in lawful immigration status on the date he or she files the adjustment application;
The applicant has ever failed to continuously maintain a lawful status since entry into the United States;
The applicant was last admitted to Guam or the Commonwealth of the Northern Mariana Islands (CNMI) as a visitor under the Guam or CNMI
Visa Waiver Program and is not a Canadian citizen;
The applicant was last admitted to the United States as a nonimmigrant visitor without a visa under the Visa Waiver Program; or
The applicant has ever violated the terms of his or her nonimmigrant status.
So even if we assume the worst case that their Extension of Stay applications are denied, and thus they are considered to have not been in status at the time their AOS is filed (if they file now), they would still have been eligible to file, since they do not have to be in status to file AOS in their category.
The fact that the lawyer missed such a basic aspect of the law does not speak well to his competence.