I am one of the owners of two flats in the building. Can I still purchase the freehold ?

You may both need to want to buy as 51% need to qualify for a freehold purchase application to be forced. If there are only two flats in a building, both flats must participate. If the other flat wants to participate but cannot afford to do so, you can still acquire the freehold; perhaps by a loan to the other Leaseholder. What matters is that they sign offers and are a beneficiary of the freehold during the conveyancing process. If the freeholder owns one of the flats you will never be able to compel the freeholder to sell a share. If the other flat isn't interested in participating you will not be able to compel the freeholder to sell.