I can't see that the couple would be breaking any UK laws by going through a marriage ceremony abroad. However, in most countries, that's all that they would be doing: 'going through a marriage ceremony'. They wouldn't actually be getting married.
Most countries recognise the validity of UK marriages and have laws against bigamy. Therefore, if Mr A and Miss B went through a marriage ceremony abroad, the 'marriage' would be unlawful, meaning that it could never be recognised in the UK (even after Mr A got his divorce). Additionally, Mr A (and possibly Miss B) could risk prosecution abroad.
Chris