First of all, I’m sorry about your diagnosis.
But secondly, although your friend (possibly now ex-friend) had no right to repeat to the boss something that you’d told her “in confidence”, I’m afraid bad news does travel fast, and once you’ve shared a secret with anyone, you’re accepting the risk they may or may not keep it to themselves. In this case it seems your confidence was misplaced, although it does look as if your friend was probably acting from the best of motives.
I’m assuming she did not know you had flu’, and from her perspective, one minute you are telling her you’re having a hard time with the MS, next thing, you’re off sick. I’m guessing she wouldn’t know it was a coincidence, and would assume the two things were connected? So she may have thought she was being protective by putting your boss in the picture.
I’m not saying that makes it alright, and that it shouldn’t still have been your choice. But what’s happened has happened, and there’s no going back now.
I suppose you could have denied it, or just maintained a dignified silence. Really, unless the information came direct from you, your boss has no business listening to office tittle-tattle that might or might not be true. However, in your place, I probably would have felt the need to clarify the situation too. If you said nothing, he would have been left in the awkward position of knowing, but only unofficially, since it didn’t come through a verified channel (You!).
I do personally think it’s advantageous for work to be in the picture - whether or not it came out in the way you would have chosen. Apart from anything else, you do know it gives you certain legal protection from discrimination automatically, regardless how ill you are, or may seem? That includes the right to have “reasonable adjustments” made to your work, to accommodate any difficulties you may be having (it doesn’t mean you must have adjustments, if you don’t need any, neither that you’re entitled to any and all you might think of - “reasonable” must be reasonable ON BOTH SIDES - i.e. it will take into account the amount of expense or disruption to your employer, to do what you ask - if it’s minimal expense or disruption, it’s more likely to be “reasonable” than if it would involve redesigning a whole building, for example).
It also means your employer cannot act quickly to dismiss you, on grounds “it will only get worse”. You are protected from the moment they know, whether or not you’re visibly disabled, and whether you’ve been off sick much - or at all.
Some symptoms of MS could be mistaken for a drink or drug problem, or just poor attitude (e.g. difficulties with memory or concentration, failure to shoulder as much work as previously). So, in that respect too, it’s probably better for work to know, so that any difficulties are not recorded as “performance issues”. I found even the stress of diagnosis meant I was getting a bit absent-minded, and had trouble focusing on the job in hand. I’m not sure any of that was directly attributable to the MS itself, but pretty common for someone who has a lot else on their mind. I felt, at the very least, work needed to know I’d had very profound personal news, and wasn’t just asleep on the job.
So I’m sorry if I sound like I’m joining the chorus of: “It’s for the best.” I think it probably is, in the long run, but that doesn’t mean I think you shouldn’t have had the choice over when and how to break the news. Does your friend know you feel your confidence was betrayed, and you were robbed of choice?