It's always been my feeling that sharing the road was a mutual obligation. I stay out of the way of traffic as much as practical, and I expect traffic to give me some space when they pass, which the vast majority do. Where I live most roads have at most a few inches outside the lane if any at all so I'm very much accustomed to this.
In this case, the rider was not just moving into the lane, they were almost all the way to the center line, which I can't imagine ever doing especially on a road with as much traffic as that including semis.
Whether it is legal or not, I just cannot see doing what the OP did in that situation. With that much traffic, I'm going to be on the shoulder or very close to it. If it's a descent and I need to brake to keep a speed that is safe for that portion of the road, I'd do it. Yes. The driver was a dick for getting as close as he did but being right won't keep you alive.