Yes he can ! But not a good idea !
Your friend can teach you to fly but unfortunately the hours and experience gained will not count towards your license so are worthless.
Unless your friend is a qualified and current flight instructor you are learning how to fly but you cannot count the hours!