It can but then they are heavily dependent on external sources of food, water, raw materials, manufactured products, etc. that are outside of its control. This gives the outside nations who are supplying those things larger influence on the domestic and foreign policy of the city-state because they can raise costs of imports or even embargo them to pressure the city-state to align with their own foreign policy goals.
I don't know why you'd pose that as a question, but not having been to Portland I did the obvious thing and spent a minute in google maps. You're welcome. It turns out Portland has a steel mill not just nearby, but within its city limits.
At the risk of stating the obvious, the point of my question wasn't to literally determine whether any big cities exist without heavy industry nearby, although that would be sort of interesting if it were the case. The point is that any such city is going to be an exception to the utterly ludicrous statement of the OP, "Because you really don't want heavily polluting industries (oil refineries, chemical plants, steel mills, etc) close to a big city." Big cities have always had this. The people there do not "want" them there any more or less than people in a small town would "want" them there.
Why aren't obese people healthy? they have so much (cellular) wealth stored up and such big organs.
Ir's not that different. If you concentrate economic wealth in cites, the periphery starts to suffer economically because it can't exploit local resources effectively, and the population starts selecting for city activity. Over generations, that leaves you vulnerable agriculturally and militarily. If you experience a natural or military disaster that deals a massive blow to one of you key cities, the whole country can collapse.