In order to remove the rim the whole headlight unit has to come out. To do that the turn signals need to be poped out by going behind them and pushing the clip in. Then I believe that there are 5 screws that hold the light in, 2 where the turn signal was, 2 where the fans are, and 1 on the bottom as well as another that goes to the thin metal panel where the wiper is. Once those are removed try slowly pulling it out, the motors bolts to the headlight itself so it will come out too. Once out there are 4 clips that hold the rim on. It isn't to hard, just takes time.
1992 Mercedes-Benz 400E
2002 Mercedes-Benz ML500