We report a combined experimental and theoretical x-ray magnetic circular dichroism (XMCD) spectroscopy study at the Ir-$L_{2,3}$ edges on the Ir$^{5+}$ ions of the layered hybrid solid state oxide Sr$_2$Co$_{0.5}$Ir$_{0.5}$O$_4$ with the K$_2$NiF$_4$ structure. From theoretical simulation of the experimental Ir-$L_{2,3}$ XMCD spectrum, we found a deviation from a pure $J_{eff}=0$ ground state with an anisotropic orbital-to-spin moment ratio ($L_x/2S_x$ = 0.43 and $L_z/2S_z$ = 0.78). This deviation is mainly due to multiplet interactions being not small compared to the cubic crystal field and due to the presence of a large tetragonal crystal field associated with the crystal structure. Nevertheless, our calculations show that the energy gap between the singlet ground state and the triplet excited state is still large and that the magnetic properties of the Ir$^{5+}$ ions can be well described in terms of singlet Van Vleck paramagnetism.