Are the parallel and perpendicular axes theorem for determination of moment of inertia valid only for bodies of uniform mass density?
No. These theorems apply for any mass distribution - continuous, discrete, uniform density, non-uniform density. See derivations in wikipedia for parallel and perpendicular theorems. Note that density does not enter into the derivation, and no assumption of uniform mass distribution is made.