@Susie ********
There's one option but it's not guaranteed, and your friend will still need to show a flight out of Thailand within 15 days to get into the country.
If at the very end of the stay, like the last day (if it's a weekday), go to immigration and apply for an extension. Any extension.
If the office accepts the application (they do not have to accept it) they will take the 1900 baht fee and stamp in the passport "Application denied, days to leave Thailand"
This is not an extension, it's an extension denied 7 days.
Leaving to another country and returning in between would also work.