Electric control of collective atomic coherence in an erbium-doped solid