To buy a property in Spain, you will need a NIE number (Foreigner Identity Number), which you can either apply for in Spain or at the Spanish Consulate in your home country.
As regards a bank account, you do not need one to buy a property, but it is going to be incredibly difficult to arrange...