Well, since you specifically say "emergency situation" (yes, all-engines flame-out definitely qualifies as an emergency)...
I'm going to refer to the US regulations, simply because those are among the easiest to find in English. I'm also willing to bet that most jurisdiction have similar legal texts in place, differing at most in details.
14 CFR §91.3(a) and (b) and §91.13 are the basic rules, which state that:
§91.3 Responsibility and authority of the pilot in command.
(a) The pilot in command of an aircraft is directly responsible for, and is the final authority as to, the operation of that aircraft.
(b) In an in-flight emergency requiring immediate action, the pilot in command may deviate from any rule of this part to the extent required to meet that emergency.
§91.13 Careless or reckless operation.
No person may operate an aircraft (...) in a careless or reckless manner so as to endanger the life or property of another.
(There are two variants in §91.13, but they boil down to the same thing, so I summarized them above.)
Under normal (non-emergency) circumstances, pilots are required to comply with ATC instructions and clearances. Excerpted from §91.123:
§91.123 Compliance with ATC clearances and instructions.
(a) When an ATC clearance has been obtained, no pilot in command may deviate from that clearance unless an amended clearance is obtained, an emergency exists, or the deviation is in response to a traffic alert and collision avoidance system resolution advisory. However, except in Class A airspace, a pilot may cancel an IFR flight plan if the operation is being conducted in VFR weather conditions. When a pilot is uncertain of an ATC clearance, that pilot shall immediately request clarification from ATC.
(b) Except in an emergency, no person may operate an aircraft contrary to an ATC instruction in an area in which air traffic control is exercised.
(c) Each pilot in command who, in an emergency, or in response to a traffic alert and collision avoidance system resolution advisory, deviates from an ATC clearance or instruction shall notify ATC of that deviation as soon as possible.
In an emergency situation, §91.3(b) and §91.123(c) take precedence; notice the exception for emergency situations throughout most of the above. These basically boil down to, if there is an emergency, the pilots can do what they deem necessary in order to deal with that emergency in a safe and expedient manner. However, they do have to tell ATC about it, generally "as soon as possible" (as in §91.123(c)), and it's not a free pass to do anything at any time just because the pilots want to; pilots who exercise their emergency authority should expect getting a talking to after they land, once the emergency situation clearly no longer exists. Once ATC knows about the emergency, they can help, for example by providing vectors to an airfield or by vectoring other aircraft out of the way. Even if you're flying in uncontrolled airspace, ATC might still be able to provide things like traffic advisories. In an emergency, trust me, any reasonable pilot will take all the help they can get, however little, but it had better actually help. The standard litmus test for aviation radio still applies: does saying on the radio what I'm about to transmit help increase aviation safety? If not, then refrain.
So ATC can make suggestions, in the form of instructions and clearances, and under normal circumstances pilots are expected and required to comply with those; but if an emergency exists, the pilot is free to give ATC the proverbial finger by simply saying "unable" and telling ATC what they are going to do instead, and ATC has to simply live with that fact, provide the assistance they are able to, and ensure the safety of other aircraft in the area. Everything else can wait until the aircraft (singular or plural) involved are safely on the ground. About all it takes is the magic word "mayday" or "declaring emergency".
All that said, if an airplane suffers a complete loss of engine power, then that plane is going to intersect the ground in short order no matter what ATC says or does. So even if they somehow had the power to, ATC telling the pilots "no you can't" would be about as productive as to tell the moon to stop orbiting the Earth, in that they can say it all they want, but it's not going to change the outcome. Obviously the pilots are going to do everything in their power to avoid a crash landing, but if they can't fix the problem while still in the air, then it will become a problem on the ground in one manner or another. ATC insisting that the pilots do something else would, at best, be a distraction reducing the pilots' ability to deal with the emergency. Of course, if the pilots are about to do something like fly into a mountain that ATC can't vector out of the way, it might still be a good idea for ATC to recommend to the pilots of the stricken flight to make a turn...