If it were me, I'd be collecting parts to keep the ER running before thinking about an engine swap. I know the oil pumps and water pumps are higher flow than the EA pumps. Parts is going to be the everlasting gobstopper, you've just got to be stubborn and eat the elephant one bite at a time.
My EA82 is the exact same way, but mine is more of a loping "rap rap rap rap" that's a lower tone, not a "clack" nor a "tick". But my oil pump also leaks from the "freeze plugs". Once my engine is warm it's quiet as a field mouse. I run 5w30 in the winter and 10w30 in the summer.
If you have the vision, keeping the ER27 would be the way to go. They're very uncommon and you'd be keeping a piece of Subaru history alive. I've never had the privilege of hearing, seeing, or putting a wrench to one but if they're anything like their 4-cylinder brother, then it'd be extremely adverse to dying so long as the fluids are maintained.
Good luck the XT6 is up there as one of the weirdest Subarus.
:]