Lamar Odom’s decision to attend rehab was inspired by a visit with his friend in prison