The draw left Rangers five points clear of second-placed Celtic, with their bitter Glasgow rivals in action later Saturday against Dundee United.
Amad Diallo scored inside five minutes of his Rangers debut but the loan signing from Manchester United was off injured by the time of County’s late leveller.
Jordan White levelled in the 25th minute after McGregor dropped a cross.
Regan Charles-Cook put the home team in front four minutes later.
Rangers’ James Tavernier equalised at the start of the second half and then Connor Goldson gave the champions the lead after 72 minutes.
In the scramble following a Country corner in the sixth minute of added time, the ball came off McGregor’s body and Wright pounced.
“We felt like this was coming a result against one of the top three,” Charles-Cook told Sky Sports.
“We played well against Celtic and Hearts. I’m just buzzing to get at least a draw today.”
Two wins in a row would take Celtic top of the table, with the Hoops at home to Rangers in an Old Firm derby on Wednesday.