Salah, who has not been at his best since returning from injury last month, was brought on in the 79th minute, just after the Hammers' second goal levelled the game
The Argentina international was shown a straight red card in stoppage time of City's 3-1 home Premier League defeat by Chelsea on Saturday for a two-footed lunge on centre back David Luiz.
Aguero's tackle sparked a melee at the Etihad Stadium, with players and coaching staff from both teams involved in ugly scenes during which City midfielder Fernandinho was also sent off.
Fernandinho will serve a three-game ban.
Aguero also served a three-match suspension for violent conduct in September for elbowing West Ham United defender Winston Reid.