Considering that one occupant has a dog, and "your" flat has a cat-flap, I would imagine the best thing is to have a new lease drafted.
Perhaps the old one could be amended?
Easier said than done though. Everything would have to be in place (legally speaking) before you commit to buy. You could, of course take a chance and go ahead, then sort out the new lease afterwards.
There are only three of you. One with a dog, you and your dog, and one other that's for sale. The current owner of that one should consider that offering a flat where animals are allowed, may possibly make it more sellable.