It could be done, but agree it will be both expensive and possibly a pain in arse to get vacant possession.
A few years back we bought a house (privately) that had been converted to four flats in the 1950/60s. As soon as we viewed we knew it was 'the one' - only three houses of that design (1880s) existed in the area and not only was it massive, it had bags of potential - but the tenants were still in situ. Alarm bells rang when we were not able to gain access to view the ground floor flat as the tenant was hostile to the idea of the house being sold.
The vendor - the father of an acquaintance - said he was selling with vacant possession, but in the end he had to take two of the tenants to court, they had to be bribed to leave and the bailiffs sent in.
In the interim we had completed on our sale and had to move in with family for six weeks with a toddler and all our stuff (contents of a four bed house) went into storage.
Reconfiguring the four flats into a single dwelling was an expensive and lengthy process (we did majority of it ourselves), but ultimately it was worth it as it became an amazing family home.
Deep pockets and a steely determination were the order of the day throughout the whole process. If you have these OP, then maybe, just maybe it could work out.
Otoh, is there nothing else in your budget that would make for an easier move?