Okay, I would say he should contact the brazilian consulate here in Bangkok and see what they advise.
If he's denied entry, it's totally up to the air carrier on where he goes. Some let him to go any place they fly, some make you go back to where you flew in from and some make you go back to country of passport origin :O
Unfortunately (seeing as brazilians get in for a 90 day visa exempt entry) it's NOT a thai VISA question and more of a "I didn't bother to check before I got on the plane to thailand" sort of thing.
I think you have some good info. Good Luck (y)
Here's the consulate
**************************************