It depends on the specific zoning district. Some commercial districts allow single-family or multi-family housing.
If the zoning district allows residential uses, the structure may be rebuilt as long as it complies with the bulk regulations of that district such as minimum building setback.
If the zoning district does not allow residential uses and the owner wants to rebuild for a residential use, the property will need to be rezoned to a district that allows a residential use.
Upon rezoning any new structure will have to comply with the setbacks of the residential zoning district approved by City Council.