Firstly, blackmail in the legal sense is a criminal offence under the Theft Act 1968 and occurs when one person makes an unwarranted demand to another with menace (eg. threat of violence or some other illegal act) with a view to making a gain for themselves. This is not what we have here.
It appears that they are attempting to leverage your friend in to returning home on the promise that they will execute Wills leaving the house to here. A person is entitled to leave their estate to whomsoever they choose and on contingent terms such as this demand. Although unethical in my view, there is no illegality which could be enforced against them by their taking this position.
If she is an adult then your friend is free to live wherever she chooses, just as her parents are free to execute wills in accordance with their particular wishes I'm afraid. Please note though that if it is her parents who actually own the flat she moved in to then they could probably evict her.
She is just going to have to make a decision and put up with it, I would though sound a note of caution in that if her parents are manipulative enough to give her this ultimatum then there is no guarantee that further demands will not be made once she has moved back or, indeed, that they will actually execute Wills in accordance with their promise. It would be very difficult and expensive to enforce this promise if it subsequently transpires that their Wills do not leave the property to her.
If she is substantially financially dependent upon them immediately prior to their deaths and they do not provide for her in their Wills then she may be able to make a claim on the estates under the Inheritance (Provision for Family and Dependents) but this, again, is neither guaranteed or cheap.
If there is an element of the situation that I am unaware of then please mention it and I will let you know if it alters her position.
If this is useful please kindly click accept so that I may be rewarded for my time. It will be gratefully received and you will be free to ask follow up questions.