Plans to convert a Ferryhill building into a flat have been approved by the council.