Joining two flats together

I live in a two-story terraced building with a downstairs neighbour. We both have separate doors and entryways.

If they were to sell up, would I be able to buy their flat and knock through, or would I need planning permission?

I’ve looked through the council’s website but haven’t found much useful info. How would I even go about researching this sort of thing?