Chemical differentiation in a prestellar core traces non-uniform illumination