Your query is covered under section 185 of the Companies Act 2013, which is "Loan to Directors".
According to the section, you can not give loan to directors unless it is a principal business of the company or it is through a general policy applicable for all employees.
In your case, if the second condition is fulfilled then it may be allowed.
For more clarity on the same you can refer to the section here: http://www.mca.gov.in/SearchableActs/Section185.H T M L
Hope it helps! :)