Long-lived sub-levels of the electronic ground-state manifold of rare-earth ions in crystals can be used as atomic population reservoirs for photon echo-based quantum memories. We measure the dynamics of the Zeeman sublevels of erbium ions that are doped into a lithium niobate waveguide, finding population lifetimes at cryogenic temperatures down to 0.7 K as long as seconds. Then, using these levels, we prepare and characterize atomic frequency combs (AFCs), which can serve as a memory for quantum light at 1532 nm wavelength. The results allow predicting a 0.1% memory efficiency, limited mainly by unwanted background absorption that we believe to be caused by excitation-induced erbium spin flips and frequency shifting due to two-level syste...