Sure it is possible in the cities.
To clarify, do you mean sure it is possible to generate electricity yourself, or do you mean sure it is possible to live without electricity? Either way, while some city dwellers can, it is simply impractical to the point that we might as well call it impossible for many people currently living in cites to live in high rises and skyscrapers without electricity. It is also practically impossible for most of them to generate enough electricity with the tiny access that they have to the resources they would need. For example, many apartment dwellers have a couple of square meters of windows or less and most of them do not have exposure in the right direction and have significant obstruction. Even if it were not probably illegal and disallowed by their landlord to install solar panels on the outside of their apartments, the amount of solar power they would generate even by doing that would not meet their needs. Cities are heavily dependent on infrastructure to support human life and often have a population density far to high to support human life if not for infrastructure and resources that come from outside the city. It is a form of specialization and some of the required infrastructure required is the electrical grid.
You may have to drastically change the way of living though.
And one of the ways that the majority of city dwellers would have to change their way of living would be to stop being city-dwellers. Which was really my point: that you should have included that as a condition in your original post. Quite frankly, I suspect that the level by which you expect people to drastically change might require the majority of people now living to change their status to not living, though it is hard to tell because you have avoided being specific.
This said, I personally am not a big fan of city dwelling and I do not live in a city and where I do live is still too built up for my tastes. However, I can appreciate that many people do prefer to live in cities and there are traditionally some good reasons for them to exist. The fact that they are inherently incapable of being self-supporting is not really a big deal. Not when you consider that the modern world and its currently available technology and legal/tax/zoning/etc. framework makes self-sufficiency problematic for the majority.
I am however, in favor of people achieving as much self-sufficiency as they possibly can in the environment they find themselves in. I think everyone that can should probably be getting home solar and batteries at this point. I do not find the power grid intrinsically bad, but I do think people should avoid dependence on it as much as they can. I also recognize that we live in reality though, and simply expecting people to just abandon all aspects of modern living is not realistic.