Yes, the barbarian elf can Rage through a Trance if they are able to begin the Rage before the Trance begins and maintain it through the Trance as there is no rule stating that the character can take actions or bonus actions while in a Trance. However Rage last a minute and there are no rules for taking actions within a Trance, so the default is that you can't.
Trance (PHB, 23)
Elves don’t need to sleep. Instead, they meditate deeply, remaining semiconscious, for 4 hours a day.
So no unconsciousness so no early ending of the Rage. However the Rage only lasts 1 minute into the Trance.
Then, even if you had some way of maintaining a rage longer, the following will be true:
A Trance is not a long rest: you do not have to Trance (or sleep) to gain a long rest, it can be a period of "light activity".
Long rest (PHB p.186):
A long rest is a period of extended downtime, at least 8 hours long, during which a character sleeps or performs light activity
If the rest is interrupted by a period of strenuous activity—at least 1 hour of walking, fighting, casting Spells, or similar adventuring activity —the characters must begin the rest again to gain any benefit from it.
Barbarian (PHB p.46):
For every barbarian, rage is a power that fuels not just a battle frenzy but also uncanny reflexes, resilience, and feats of strength.
Rage (PHB p.38):
In battle, you fight with primal ferocity. On your turn, you can enter a rage as a bonus action.
Rage is a period of primal ferocity, a battle frenzy which means it is by definition strenuous. Therefore if you Rage for more than one hour in total during a long rest you must start again.
To summarise:
- RAW You can rage and perform a Trance (with the right race/class/special magic item or other abilities) for instance avoiding the exhaustion levels from not sleeping or equivalent. Crazy but true and as a House Rule in my games I would disallow it unless the player came up with a justification I have not thought of.
- You cannot gain the benefits of a long rest if you rage for more than an hour during the long rest period, as raging is a strenuous activity.