Hi
Thank you for your question.
To qualify for the rent a room scheme you must have lived in the property as your main residence at some point during the particular tax year and the room/rooms must have been rented out whilst you were living there.
Please refer to the following guidance for further information :
Rent a Room Scheme (Self Assessment helpsheet HS223).
Your friend would be entitled to use the rent a room scheme as long as all the conditions were met.