The Yanmar is a known reliable engine. Rebuilding is an option and certainly cheaper than a replacement. Is it freshwater cooled or raw water? A good insurance policy would to have a competent Yanmar engine guy go over it and do a compression test before you buy the the boat. 1200 hours is not that much if the boat has been properly maintained.
The $12,000 cost seems reasonable if the boat is in overall good condition. What condition are the hatches and portlights. Make sure the cockpit sole is thoroughly checked out by your surveyor. What about the sail inventory and roller furling. Replacing standing or running rigging can get expensive.
Bottom line- make a spreadsheet of all that you thing would need to be replaced or repaired. Add the total cost to your purchase price and see if it makes any sense. My guess is that the total exceeds $18,000 you could do better with a different boat. Try looking for a Great Lakes boat. They usually have lot less wear for the same age boat.