Yaya Toure and Jesus Navas had chances in the first half for City, but they were poor overall.
There was still time before the half-time whistle for Demichelis to bundle over Rashford in the area as the young United forward got the better of him yet again.
Referee Michael Oliver spared him by not awarding what looked a certain penalty.
His second half would not last long as his shocking backpass came four minutes after the restart and he was soon pulled off.
The damage was done though as Pellegrini wasted two substitutes taking him off and replacing Hart with Willy Caballero after Sterling had limped down the tunnel in the first half with a groin injury.
The City stand in keeper was called into action two minutes after coming on when he pushed away a deflected strike from Martial.
It was up to Aguero to save City and he did his best to do it alone with a shot fired wide and a header cracking the post from a Toure cross.
Toure would then be denied by a last-ditch Michael Carrick tackle when he looked certain to beat David De Gea from close range.
Jesus Navas lashed one over late on before Aguero smashed wide after turning Antonio Valencia, but they could not find an equaliser.
City have now won just four in 11 since the club announced Pep Guardiola will be taking over from Pellegrini in the summer.
The home fans were heading for the exits before the final whistle and probably counting down the days until Guardiola arrives.
Whether the Spaniard is managing in the Champions League or Europa League remains to be seen.