Burton captain McGrath has joined on a one-month loan deal while Aldershot's Rankine has returned to Bootham Crescent for the rest of the season.
McGrath, 32, has made just one start for the Brewers since recovering from a serious foot injury in November, so heads to York in search of regular first-team football.
The move will see him link up with his former Tamworth boss Gary Mills.
The experienced midfielder has made 246 appearances and scored 19 goals for his parent club since joining them in the summer of 2007.
Rankine has found first-team football hard to come by in 2013 and was recently sent out on loan to Blue Square Bet Premier side Grimsby.
Rankine scored 24 goals in 103 games during a two-year spell with the Minstermen from 2009 to 2011.
Meanwhile, York striker Jamie Reed has joined Cambridge on loan until the end of the season.