The England international has been strongly linked with a move to Everton, with the Toffees looking to land the midfielder on a season-long loan.
Barry has entered the final year of his contract at the Etihad Stadium and faces fierce competition for places.
City have invested heavily over the summer, with £30million spent on Ferdinando - a man who will be looking to fill the same position as Barry.
Pellegrini would prefer not to part with a player of Barry's considerable experience, with strength in depth vital if the Blues are to challenge for top honours.
He will, however, not be standing in the 32-year-old's way if he decides he needs to look elsewhere for regular first team football.
Pellegrini said ahead of City's opening fixture of the 2013/14 Premier League season against Newcastle United on Monday: "In the position of Gareth we have also (Jack) Rodwell, (Javi) Garcia, Fernandinho and Yaya Toure.
"I spoke with Gareth. He wants to stay here and he does not have any problems staying here to fight for his position like any other player in the squad.
"If he wants to go because he has better options, it depends on what he wants to do."