Unfortunately no simple rule here. Sometimes yes, sometimes no. For lanthanide atoms, and to a lesser extent, rare earths, if the material is insulating probably you can treat the atom as a free spin. But, for example, diamond is an insulator, and it is probably better thought of as a band insulator with no local moments anywhere. Similar for Boron Nitride and many others.