If the amount owed is legal and there is documented evidence, then an employer can deduct it from the wages for a final settlement. It is common practice to deduct money from the final settlement when a employee quits the company for whatever reason.
If there are terms of the loan that he must pay it back in X years irrespective of his employment status with you, then it is a different story.
If there are terms of the loan that he must pay it back in X years irrespective of his employment status with you, then it is a different story.