Strictly you're not supposed to, but in reality they don't check who it's for as long as the purchaser is a legitimate teacher or student.
Whose to say your friend isn't just extraordinarily generous and bought the Mac as a present?
I recently got an eMac for my sister through the edu store, it's the 4th or 5th piece of kit I've bought, and they've never verified that I am a lecturer directly with me, although they may have checked in other ways.