It's not density, it's mass. A mass of 1kg compressed to the density of the Sun's core would pull the Earth with just as much force as a 1kg ball of styrofoam.
Xkcd did a what if on a black hole moon (getting it to collapse into one may be impossible, but a black hole the mass of the moon is theoretically stable), and it has the same conclusion, except just slightly colder instead of slightly frozen. And by slightly, I mean almost imperceptible.
Is it stable, or "stable?" I thought the threshold was pretty close to the mass of our sun before Hawking radiation overtook the CBR and meant that it would eventually evaporate. I could see the moon being enough to not instantly explode, but I'm pretty confident it would eventually.
Just to add some formality to this, the original commenter might want to look up the shell theorem for classical mechanics and Birkhoff's theorem for general relativity.