A disgraced dentist has narrowly avoided a spell behind bars after letting one of his rental properties be used as a massive cannabis-growing operation.