I would personally wait and see how the surgery goes. If it's a success, in that it stops the horse from being lame, and will keep her that way for the level of work you want to do, then consider it.
Obviously the price should reflect the risk you are taking that it might recur.
A good look over by the vet for any other problems would also be very much advised.
In the end, it's a personal decision. There is a risk of the problem recurring, but if the price is right and you can live with the risk, there's no reason not to buy.