Probing interacting two-level systems with rare-earth ions