Is it legal for a car to overtake me as I overtake a parked car in UK? The road has one lane. There is a parked car on the side. I overtake it and position myself in the middle of the road because no car is coming from the front. Often enough, at the same time I get overtaken by a car from behind. 

I feel like this is illegal as it creates a double overtake…

I guess I can prevent this by going more to the right when overtaking so that the cars behind me cannot pass at the same moment, but should I?
A parked car isn't moving, so you're not overtaking it. 

Whether it's legal, safe, or sensible for the car to overtake you is another matter, and very heavily dependent on the circumstance. Consider a long straight road with a line of parked cars and no oncoming traffic. You take up much of your side of the road staying outside the door zone, and the car is mainly over the line as it passes you with plenty of room.  No problem. Now you approach a bend, the the centre line goes to a double solid line. It's now illegal to overtake you, parked cars or no parked cars (unless you're doing less than 10mph).

Generally speaking you should rise far enough from parked cars that if one of them suddenly opens a door it doesn't hit you. That's not always possible (the worst obvious problem case is when the door zone is marked as a bike lane). Riding this wide is likely to delay cars behind you depending on oncoming traffic, and in reality that is something you need to take into account.