Dear Friend,
You are advised to follow the rules/standing order of your establishment, if any. If the appoinment condition of trainee is to pay only stipend then you are free to realise the house rent from his stipend. In absence of clarity it is always good to take a written authorisation from the trainee for deduction, to avoid future complication.