The Trek Rail 7 runs a Rockshox Yari doesn’t it?
They still run a Debonair air spring and Motion Control damper, same as on the 35 Gold, so they shouldn’t feel that different?
I’ve never ridden a Yari, but I find the Gold 35 competent for what it costs. Maybe your fork needs a setup, or just a bit of use? How old are the forks on your mates bike?
On mine I have Compression damping wound off, and a bit less rebound than recommended. I also run a bit less air pressure than recommended, I don’t worry too much about the sag setting, I just go with what feels right for my riding which is mainly just trails and rocky/rutted short descents.
They can feel a bit harsh, particularly when new and running too much pressure.
Regarding any new fork you buy, depends on your budget but the Yari is well regarded and upgradable, although I’d you go down that route you may as well get the Lyrik. I’ve not ridden the Fox offerings much, so can’t really comment, but they are pricey.