Yeah. If you aren't careful the stuff you pick might have as many pesticides as the food you buy in the store. Probably not though. People put the chemicals on their commercial crops in order to make the food prettier and increase yields. If you avoid picking your weeds out of farm fields, your risk of those chemicals is pretty small.
City parks are usually sprayed as well.
There is plenty of good areas to forage but most are outside the city the exception being trees that are "ornamental". You can find them in people's yards if you know what to look for.
Knock on the door and ask politely if you can (carefully!) harvest the seed, nuts or fruit. Usually they will say yes as they regard the mast as useless stuff they have to clean up every year.