I do not think the Insolvency Service is bound by any voluntary agreements or decisions of the divorce courts about division of property on divorce, but I am not certain about this. It is quite normal for any jointly owned home to be taken and sold if one of the owners becomes bankrupt, or for the Official Receiver to offer to sell the bankrupt's beneficial interest in it to the non-bankrupt partner.
The solicitor might argue that your partner's beneficial interest is low (I have known divorce cases where the wife has ended up with well over half the beneficial interest) but the Official Receiver would undoubtedly want to look into this independently.
The solicitor is working your partner's ex, so I guess would be unlikely to advise her to agree to sell unless he was fully convinced there was no alternative. However, from what you say if the house is not sold your partner will have to go on paying the mortgage and this will also be something the Official Receiver could enquire into, because if he was not paying it he could contribute more towards his creditors.
Are all the debts just in your partner's name? If any are joint ones, his ex's liability for them will not be wiped out by his bankruptcy.