Honestly, I'd prefer to be at the back in a situation like that. You don't have to worry about someone else riding up your butt. Like others have said, in some trails you CAN'T ride three abreast. They're too narrow for multiple horses. If you're following another horse (be it you're the second or third rider) it's your responsibility to keep your horse from riding up on the horse in front of you. If your horse is consistently walking up on the other horse AND the second horse is allowing there to be a big gap between them and the first one, then maybe the pace would be better if you're in the middle. Consider that for next time, but don't allow your horse to pass the middle horse on his own terms. You don't want to be teaching any bad habits
If you have room then circling is also an option to get your horse to back off. Still, remember that you'll have to worry about running up on the horse in front of you. Since you're a new rider that isn't as familiar with the trails, it makes sense that the trainer needs to be first.
I understand the frustration with trails. I often ride out back with my friend on her 17hh TB that gets a bit jiggy on trails. He walks considerably faster than my 15hh QH and gets upset if my horse were to trot up behind him, but we've gotten a routine. I try to get my guy to walk at a brisk pace, she tries to slow hers down, and circles if she has to. Things get thrown all out of the loop if it's summertime and spider season. She HATES the banana spiders and webs that form across the trails, so I go ahead of her to knock down the spiders. Her horse gets nervous and rides up my butt, and it is really frustrating! The chances of my guy kicking hers are pretty slim, but still...
It's all about getting used to it. You're a bit nervous, and it's normal. Perhaps ask your trainer if you can go on trail rides more frequently so it becomes a routine for you. Trails aren't for everyone, but most people love it once they get used to it