But if some Member States do not ' mutually agree ' then some Member States will have to do as they are told, in other words ' not allowed ' to do as they want.
Oh, come on, POGS. That's how organisations work. You accept that you're not always going to have things your own way when you join an organisation and that there may be a consensual agreement to implement something that you, personally, don't care for. You're presenting the EU as a bullying entity; it's no more such an entity than is a tennis club, or a book club, or any other sort of club.
As far as I can see, costs incurred through the EHIC scheme are claimed back from the appropriate member state, and the UK operates several 'reciprocal agreements', doing much the same thing, with a number of non EU countries. So treatment is 'free' to the treated individual but paid for by their country, and, it's perfectly possible to be an EU member state with reciprocal agreements with non EU states.
Which, if I'm reading this correctly, leaves Portugal free to offer 'free' treatment to whoever they damn well please.