I get that one ought to follow cyn with i + pronoun when the subject changes, but in a case like this, would Gaethon ni barti cyn ymddeol be acceptable too?
Loosely, perhaps. It would convey a similar meaning but, as in the English equivalent, by using different wording. The '...before we retired' '...cyn i ni ymddeol' version feels better, perhaps:
- Fe gaethon ni barti cyn i ni ymddeol - We had a party before we retired
- Fe gaethon ni barti cyn ymddeol - We had a party before retiring