Your Contact will probably state that if you take the house off the market you will not be able to sell the property to anyone THE AGENT HAS INTRODUCED to the property within a set time. You can take the property off the market at any time after the minimum period -usually 3 months- though I took a property off the market after 4 weeks with an agent as they were rubbish, and although I was told by the agents i couldn't, there was really nothing they could do. So, as long as the friend has not contacted the agent with regard to your property you are quite within your rights to sell to that friend at any time