As mentioned by @IvanNeretin and @IanBush in the comments, the cation in this case can be neglected as they have noble gas configuration, and therefore are diamagnetic.
In general, for an ionic solid, it is possible to consider the magnetic effect of the ions separately. As there is no covalent bond, it isn't particularly necessary to look at the molecular orbitals (MO) of the system. This is true, even for many transition metal compounds, such as magnetite ($\ce{Fe3O4}$), which has $\ce{Fe(II)}$ and $\ce{Fe(III)}$ centres. The magnetic behaviour of the solid can be reasonably explained by considering each of the iron ions as a separate magnetic dipole. The oxygen stays as oxide ($\ce{O^2-}$) which has no unpaired electrons, and is diamagnetic.
There are some interesting cases, where covalent molecules show magnetic behaviour due to unpaired electrons. In those cases, you have to consider the MO of the whole molecule, there is no way to consider the individual atoms as magnetic.
For example, this compound:

This is a spontaneous charge transfer salt that is produced when you react decamethyl ferrocene with tetracyanoethylene under the right conditions. The ferrocene moiety gives up an electron to the $\pi^*$ orbitals of tetracyanoethylene. The tetracyanoethylene radical anion formed is magnetic due to the unpaired electron. The iron is in $\ce{Fe(III)}$ state and is also magnetic.
In solid state, the ions are close enough for the spins to couple, and the solid becomes a ferromagnet below $\pu{4.8 K}$.
Incidentally, this is the first compound isolated where part of the magnetism is coming from unpaired electrons that are in p-orbitals (i.e. MOs formed from p-orbitals). All previously known magnetic materials had d-block elements.