Anyway, as regards to your query, have you applied to the Railway Technician post through proper channel that is have you mentioned your present employment there. If so then NOC becomes mandatory. If your present employer is not giving you that then you can give him in writing that you require it for your Railway job and if you have to give a one month notice or thing like that then you are ready for it. In that case they may agree to issue NOC but deduct your one month salary. Go to your employer and request him to help you. If you agree to their condition of deduction of salary in case you are leaving immediately then they should not have problem in issuing NOC.
Knowledge is power.
If your Head Master says he can't forward ask him to write on that letter stating that not forwarded. There is no right to him to say no to your application. If the says no you can directly approach MEO/DEO.
You can tell the railway also that you have applied for that post before joining the job and there is no necessity of NOC. You can tell them that you will resign and join if you got selected.