Although Thailand does not require 6 months validity as long as the passport is valid for the duration of stay, most airlines don't seem to accept this over an abundance of caution. I have been in this situation although over a land border and although the UK Embassy told me I needed 6 months, they were wrong and I was admitted. Your situation is tricky as it may be more difficult to convince the airline check-in. A letter from someone in authority in Thailand may help. Good luck.
The UK Embassy in Thailand do not legalise documents - it is done by the Legalisation Office in Milton Keynes - but they do certify passports. Appointments are made online.