From ThaiEmbassy.com (not the official website of the Thai embassy):
They must have a confirmed return ticket to show that they are flying
out of Thailand within 30 or 15 days of entry, as appropriate. Open
tickets do not qualify. Travelling overland out of Thailand by train,
bus, etc to Cambodia, Laos, Malaysia (including en route to
Singapore), Myanmar, etc is not accepted as proof of exiting Thailand.
You may be asked to show your flight ticket on entering Thailand. If
you do not possess a flight ticket to show you will be exiting
Thailand within 30 or 15 days of entry you will be most likely to be
So, technically you need a onward flight ticket (not necessarily a return to where you came from).
Now, someone may come along and say they don't really check for those details, and they probably don't unless you make them suspicious but technically they can refuse to give you a visa.
However, your profile says your from Canada, if you hold a Canadian passport then you qualify for the tourist visa exemption which has different rules:
Foreigners entering Thailand by any means under the Tourist Visa
Exemption category are required at the port of entry to have proof of
onward travel (confirmed air, train, bus or boat tickets) to leave
Thailand within 30 days of the arrival date (otherwise a tourist visa
must be obtained).
It's also worth noting this:
... passport holders from 41 countries and 1 special administrative
region - Hong Kong SAR - are not required to obtain a visa when
entering Thailand for tourism purposes and will be permitted to stay
in Thailand for a period not exceeding 30 days on each visit. If such
foreigners enter Thailand at immigration checkpoints which border
neighbouring countries (overland crossing), they will be allowed to
stay for 15 days each time.
So factor that into your plans and it does look like you should have some proof that you're going to leave within the 30 day window (your flight out will work for your reentry into Thailand but you'll only get 15 days if you come in overland.)
Now, in my experience I've never been asked for proof of onward travel when entering Thailand (at Bangkok airport). Your experience may be different.