Your 'very good friend's' action is a game changer, a line drawn that signifies the point you can identify as being the reason for the demise of your friendship.
Whatever happens, you can never go back to the relationship you had before, can never unknow what you have found out about her character, can never forget that she is ultimately willing to sacrifice your friendship over this issue.
Even if you make the position clear before the sale goes through, as others have suggested, this friendship is now realistically dead in the water.
Either YOU will have the house she originally wanted (but which wasn't on the market when she started looking) and she will be forever resentful that it belongs to you or SHE will have the house you want and you will be forever resentful that it belongs to her.
My advice, for what it's worth, is to look somewhere else as this house is a poisoned chalice that comes (to whoever ends up buying it) with a price tag that includes the loss of a friendship. It will probably never now be the dream holiday home either of you once hoped for as it comes with too much collateral damage, it's just a very sad situation.