Quantum erasure within the optical Stern-Gerlach model