Why don't they like it each other? Basic personality incompatability? Or something more specific to them and to the relationships involved?
And I get not wanting someone at a wedding whom I do not like. But welcome to real life. Didn't like my former mother in law but she would have been at my wedding to my ex. Some of my exes' best friends can be sloppy drunks. They would have been there too. If M wants you in her life, well, R is now part of the 'you' package too. R is one of her metamours and vice versa. They don't have to be best buds.
I don't see why R can't go as your date, be civil, eat cake and give a nice present from the both of you. Unless you think either R or M can't be civil in public to each other.