Are you under a doctor's care regarding the Bartholin cyst? It shouldn't be something to shrug off or let go on.
The only risk I can think of is, if someone has an inflamed Bartholin gland, they are supposed to watch out in particular for it getting infected. Anal sex has a higher risk of producing an infectious environment than vaginal sex does. So, you'd have to be really careful about where the guy's penis goes after penetration.
Do you want to have sex with a painful Bartholin cyst? If you're just doing this to please your partner, maybe they would understand if you wanted to take a bye until the cyst drains and heals.