Yes
Gravity is the same in the vaccum and in a medium.
It does not depend on the medium between the objects that it acts on. The relation for gravity is purely based on the masses of the individual objects and the square of the distance between them.