The velocity transformation law applies in all cases. If ##u## is the velocity of an object in one reference frame (e.g. the speed of light in a medium); and ##v## of relative velocity of the reference frame to another reference frame; then the velocity of the object in the second reference frame, ##u'## is given by:
$$u' = \frac{u + v}{ 1 + \frac{uv}{c^2}}$$ Some examples:
1) If ##u = c##, i.e. the speed of light in vacuum in one reference frame, then: $$u' = \frac{c + v}{ 1 + \frac{cv}{c^2}}= c\frac{1 + \frac v c}{1 + \frac v c} = c$$ And we find that the invariance of the speed of light is maintained by our velocity addition formula. Note that was independent of ##v## the relative velocity between the reference frames.
2) If ##u = 0.9c## and ##v = 0.9c##, then $$u' = \frac{1.8c}{ 1 + \frac{0.81c^2}{c^2}} = \frac{1.8c}{1.81} < c$$ and we see that the speed of the object is till less than ##c##. I.e. this formula never results in a speed greater than ##c##.
3) The second example applies to your case of light moving at less than ##c## in some medium - e.g. moving at ##0.9c## in a medium with a refractive index of ##1.1##. If that medium is moving at velocity ##v## in some reference frame, then the velocity transformation rule applies.