First, the US has no exit checks, no matter when departing by air, sea, or land. One never interacts with immigration authorities when departing the US. Theoretically, CBP could conduct random checks at the gate, but I have never seen that happen in my travels. In general, anyone can leave the US at any time with no problems as long as they can enter the destination country. One's status in the US is irrelevant.
Second, though overstay is illegal, it is not a crime in the US and cannot cause her to be sentenced to a term in prison. The mention of 3 and 10 years sounds like this "lawyer" is confusing it with the 3-year and 10-year ban. Under INA 212(a)(9)(B), if one accrues 180 days of "unlawful presence" and then leaves the US, they trigger a 3-year ban (i.e. will be inadmissible for 3 years after leaving the US); if one accrues 1 year of "unlawful presence" and then leaves the US, they trigger a 10-year ban (i.e. will be inadmissible for 10 years after leaving the US).
But even if this "lawyer" thought she would trigger a ban upon leaving, that would be incorrect in this case, as overstay and "unlawful presence" are different things. Up to now, someone must stay past the date on their I-94 in order to start accruing "unlawful presence"; someone admitted with "D/S" on their I-94 did not start accruing "unlawful presence" by staying past any date, even if they stayed for years past the end of their program. The only other ways to have started accruing "unlawful presence" are: 1) if they applied for some benefit to USCIS and were denied along with a determination that they were out of status, or 2) if they were given a final order by an immigration judge in removal proceedings in immigration court. Assuming that neither of these things have happened, your friend has not even accrued a single day of "unlawful presence" so far.
Next month, starting August 9, 2018, people in F or J status will start accruing "unlawful presence" if they are out of status. If your friend continues to stay in the US, she will start accruing "unlawful presence" on this date. If she leaves before having accrued 180 days of "unlawful presence" (i.e. before February 2019), she will not trigger a ban upon leaving. If she leaves after that, she will trigger a ban upon leaving.
Even if she has no ban, it would likely be very hard for her to get most types of nonimmigrant visas to the US in the future given her overstay.