These are excerpts taken directly from the building codes as they relate to the code official/inspector's powers.
Section 104 - Duties and Powers Of Building Official
The building official is hereby authorized and directed to enforce the provisions of this code. The building official shall have the authority to render interpretations of this code and to adopt policies and procedures in order to clarify the application of its provisions. Such interpretations, policies and procedures shall be in compliance with the intent and purpose of this code. Such policies and procedures shall not have the effect of waiving requirements specifically provided for in this code.
Wherever there are practical difficulties involved in carrying out the provisions of this code, the building official shall have the authority to grant modifications for individual cases, upon application of the owner or owner’s representative, provided the building official shall first find that special individual reason makes the strict letter of this code impractical and the modification is in compliance with the intent and purpose of this code and that such modification does not lessen health, accessibility, life and fire safety, or structural requirements. The details of action granting modifications shall be recorded and entered in the files of the department of building safety.
104.11 Alternative materials, design and methods of construction and equipment
The provisions of this code are not intended to prevent the installation of any material or to prohibit any design or method of construction not specifically prescribed by this code, provided that any such alternative has been approved. An alternative material, design or method of construction shall be approved where the building official finds that the proposed design is satisfactory and complies with the intent of the provisions of this code, and that the material, method orwork offered is, for the purpose intended, at least the equivalent of that prescribed in this code in quality, strength, effectiveness, fire resistance, durability and safety.