The number of protons identifies the element. The protons (atomic #) never changes for an element. If the proton number for the element is 12 it can only be identified as Magnesium. Therefore, you are correct. It is an isotope of Mg. An isotopes are just different atom versions of an element with different numbers of neutrons.
atomic mass = protons + neutrons.
21 (mass) = 12p + ?n
21(mass) - 12p = 9n
It is an isotope of Mg with 9 neutrons.
Magnesium-21 (mass)