Interface control of surface photochemical reactivity in ultrathin epitaxial ferroelectric films