Can I apply for a Thai Visa in Malaysia or Singapore?

Yes and No. As per Thai visa law, Indian passport holders can apply for a Thai visa in India or a country they are resident in. So, you must hold a PR or a temporary residence visa (work, student etc.) in Singapore, Malaysia or any other third country in order to apply for a visa at a Thai embassy in that country.