It had looked as if Rovers were going to earn their first win in 10 games, and at the same time move eight points clear of the bottom three with two games to play, but the right-back stepped up with three minutes remaining to steal a draw.
Two goals from Jason Euell, either side of a Stephen Foster leveller, put Rovers on course for a deserved victory before Trippier struck.
But their safety is still all but guaranteed as Sheffield United or Scunthorpe must make up a considerable deficit in goal difference to have any hope of overhauling Rovers.
Barnsley's safety was sealed on Saturday but boss Mark Robins must have some concerns about their end-of-season form as they have just one win in the last eight games.
The game enjoyed a lively start, with both sides having sight of goal.
Jacob Mellis was denied as he tried to capitalise on a goalkeeping error from Doncaster's Gary Woods, while James Hayter twice went close for Rovers, bringing a good save from Luke Steele with a header before then shooting wide.
Mellis dragged his shot just wide from the edge of the area, before Nathan Doyle brought a smart save out of Woods and from the resulting corner Matt Hill sliced his effort wide when unmarked at the back post.
Doncaster built up considerable pressure in the closing stages of the first half, with Wayne Thomas being denied an opener after Steele produced a save he had no right to make, superbly palming the ball away one-handed.
Rovers began the second half in a similar fashion, still bossing matters, and they took the lead just before the hour.
After extended pressure Simon Gillett fired a ball across goal and Euell was handily placed to sidefoot the ball home to give his side deserved lead.
Rovers were in total control and almost doubled their lead, but Thomas saw his header clip off the post.
But they were reliant on their goalkeeper Woods to keep their lead intact shortly after as he came out to superbly block at the feet of Andy Gray.
Barnsley gained some momentum from that chance and fashioned out an equaliser in the 68th minute when Foster converted into the roof of the net from a dangerous Jacob Butterfield corner.
But they were victim of a disastrous goalkeeping error by Steele five minutes later when he dropped a harmless John Oster effort into the path of Euell who had the simplest of tasks to restore his side's lead.
Rovers were on course for victory until Ryan Mason fouled Doyle 25 yards out and Trippier stepped up to curl in a delightful free-kick that sailed into the top corner, ensuring the game ended all square.