Yes, it is possible for a star to have an orbiting body (a planet) which has a habitable body as its satellite (a moon), and it is possible for such a habitable body to have its own satellites (the moon's moon). It is even possible for the satellites to have their own satellites, though rather unlikely.
The more satellites of satellites a system has, the more unlikely it is... though consider that technically a star may be the satellite of the super-massive black hole at the centre of its galaxy.
If the star is the largest body we are considering, the body orbiting the star will be the next largest (discounting other bodies in orbit around the star), the habitable body will be smaller again, and the body orbiting the habitable body will be yet smaller still.
If bodies approach the same mass, it can no longer be said that one orbits the other, but rather that they orbit each-other, or more specifically, they orbit a common barycentre. Thus, the difference in mass between primary and satellite must be sufficient that the barycentre is within the primary for it to be considered to be truly orbiting the primary.