District is a more general term that can be used in many different places, but borough is only used in certain big cities, as you said. For example, New York City has boroughs like Manhattan, Brooklyn, the Bronx, etc. Even lots of big cities don't use boroughs - I'm from Chicago, and there isn't a borough system there.
I would recommend using the terms "neighborhood" or "district" for most places.