I do not think Immigration will allow you to cancel your 1 year Extension of Stay and apply again for a new 1 year Extension of Stay just because you do not like the last day.
The only way is to leave Thailand without a Re-Entry Permit and start all over again.
a Company can not cancel an Non B visa inside a passport.
IF your friend had an stamp from Immigration, Extension of Stay permitted up to xx Aug 2022. This has to be cancelled by the owner of the passport. As this Extension of Stay ends on the same day as the person is employed, the owner of the passport needs to apply for a new Extension of Stay and meet those requirements of leave the country.