Yes, at an immigration office in Thailand. Each province has an immigration office and each of them have slightly different requirements. Chiang Mai will issue in country ED visas for a 20k baht fee. I don't know about Bangkok.
You can study on a tourist visa or whatever you're on now. You can get an ED visa in country, normally there's a $20k baht in country conversion fee. Depends on the school and immigration office though.