I am studying on an F1 visa but have to take leave to find funds to continue my studies. When I take leave I have 15 days to leave the country. My question is, can I apply for an ESTA while I'm still in the states on a F1? I need more time than the 15 days to find a subletter for my room and to pack my things before taking the leave from school.
You can apply for a travel preauthorization (ESTA) while your are still in the US and even if you hold a different type of visa.
That would be pointless in your situation, though, as the ESTA only permits you to apply for admission under the visa waiver program at a port of entry. It is only useful when you cross the border into the US, and hence will not give you an extension on your 14 days.
Whether it is a good idea to leave the country and enter again to extend your 14 days is a different question, though. Note that if you cross by land (e.g., to Canada), you do not even need an ESTA (provided that you are eligible for the Visa Waiver program).
I suggest that you discuss your options with the international office of your university.