The site is a collaboration between the Thai FDA, Narcotics Control, and Ministry of Public Health. Enter details, select name(s) of meds, get the answers. If any of them are, follow the instructions to apply for a permit to bring them into the country. Typically, you receive your permit in 2-3 days.
If you have a tourist visa, you can stay for 60 days or extend it for another 30 days. If you just arrive with your passport, you will receive a visa-exempt stamp that will allow you to stay for 60 days or extend the stamp for another 30 days.
As I said, it will be a problem if they ask you for an onward ticket when you check-in for your flight to Thailand. It won’t be a problem if they do ask for one and you don’t have one. It’s easy to buy a refundable ticket, in case they ask, then cancel it after you clear check-in. Or, as already recommended, by an onward ticket online that is a real ticket that they automatically cancel after a short period of time. They cost around $15US. Good peace of mind.
All airlines serving Thailand are required by law to check for an onward ticket within the visa timeframe. Most airline clerks check; some don’t. Follow the advice already given.