This isn't true for a problem such as this. (I.e., infinitesimally "thin," hollow shell.)
All that's necessary is to define surface density.
\rho_s = \frac{M}{A}
You can think of it as
mass per unit area. (If it helps to think of it in familiar units, perhaps think of it as \left[ \frac{\mathrm{kg}}{\mathrm{m^2}} \right].)
For this problem, the density of an infinitesimally thin, spherical shell is \rho_s = \frac{M}{\mathrm{Surface \ area \ of \ a \ sphere}}.
This shouldn't be too unfamiliar to you. You've probably done this before for linear density. For example, if you were finding the mass per unit length of a thin rod, you would start with \lambda = \frac{\mathrm{mass \ of \ the \ rod}}{\mathrm{length \ of \ the \ rod}}. It's the same idea here with \rho_s, except two dimensions are involved instead of just one.
The differential mass, dm is calculated by
dm = \rho_s (\mathrm{differential \ length})(\mathrm{differential \ width})
A picture might help here. The following is a picture of a small, differential patch of surface on a sphere of radius r, where \theta represents longitude and \varphi represents latitude (well, lattidue with 0 deg and 180 deg defining the poles).
View attachment 252482
This differential mass can be used in calculating the moment of inertia, keeping care to properly specify the distance of dm to the axis of rotation. The integral can then be carried out integrating over \theta and \varphi . Only two integrals are necessary.
No integration over the radius of the sphere r is necessary. The radius of the sphere treated as a constant. (Don't confuse the radius of the sphere r with the distance from dm to the axis of rotation. They are different entities.)