Being sacked for refusing to cooperate is a daft threat to make, because that alone could put them in front of an employment tribunal.
However .... being sacked for refusing to cooperate, and ending up being sacked if you don't cooperate are very different, and the latter is a possibility.
You have to bear in mind that your employment is a contractual issue, and that it implies duties and responsibilities on both sides. Part of that is that you are capable of doing the job. For instance, if you have a long-term health issue that means you are not capable of doing the job for a protracted period, then you might be dismissed for that reason and, if the employer does it properly, it will be fair. To do that, they need to look at all the circumstances, and to act in a way that is "fair", but fairness cuts both ways. That fairness will include how long it is reasonable to expect the employer to wait for your health to recover to the point that you can fulfil the contractual obligations of your employment contract. Don't make the mistake of thinking that you can't be dismissed because you're ill, because you can. It isn't entirely straightforward, and it certainly has to be done in a way that is fair, but it most certainly is possible, in the right circumstances. Spencer v Paragon Wallpapers Ltd 1977.
It is also the case that in a situation like that, one option open to an employer is to offer suitable alternative employment, perhaps with less hours, perhaps in a different location, perhaps involving different things so that a physical problem may be worked round. For instance, you may not be able to go out and about driving all day, but you might be able to do desk work.
In that type of situation, it is quite reasonable for an employer to seek to consult with your GP about exactly what the condition implies in terms of what you can and can't do. In many cases, not being able to do your normal work doesn't mean you can't do any work at all.
You're right, in that they cannot demand you consent, and to do so would be stupid. But .... if you refuse, they can act on the information and circumstances as known to them, and that might result in dismissal when the report might have meant an alternative could be found.
They cannot demand a medical report, but they are quite within their rights, as explicitly laid out in the Act I mentioned earlier, to ask for one, provided it's for "employment or insurance purposes". They can't do it because they're being nosy, but they can do it if they have valid reason.
Similarly, if you have a series of absences for different reasons, then your job is potentially at risk.This time, it isn't so much the medical condition that's an issue because those reasons were different, but it is an issue of reliability and of living up to your contractual commitments. Most employers will have a procedure for dealing with this, and it may include meetings, targets and deadlines for improvement being set, and it may include company occupational health or doctors, but they can take action based on persistent minor absences, provided their procedures are fair, and they follow them.
Tell them to take a walk off a cliff by all means, but if you do, the result may be unemployment. You may not have ended up like that, but believe me, it is a very real risk. At the very least, your cards will likely be marked as awkward and obstructive, which may well put paid to chances of promotion. That may never be formally put on file, but managers have a way of noting things like that, and tend not to forget.
All this is why I said to think it out carefully. And each of us have different experiences, different circumstances and different employers and relationships. It might be in your best interests to decline, though I'd strongly advocate a less pejorative way of declining than the cliff suggestion (perhaps, like regard for privacy), but it equally well might be that they are looking for ways to help you and you prevent them doing it. The best way to find out is to allow them to request the report, and then examine the report to see what they requested, and what they're going to get. Then, and only then, decide whether they get it or not.
It's probably best never to be in the position where they ask for a medical report, but given that they have, that is, in my view, the best way forward.