Is the speed of light through a medium invariant, just like the speed of light through vacuum is invariant? Also, do time dilation etc. still occur? So, we know the speed of light through a vacuum is $c$.
Let us say that both our observers are moving past each other at speed $v$ in a medium in which the speed of light is $c'$.

*

*So, does the usual postulate of relativity apply in this case as well? That is, will the speed of a light beam in that medium be $c'$ in the frame of both the observers irrespective of the speed of source/speed of observer, etc.?


*Will all the relativistic phenomena like length contraction, time dilation, twin paradox etc. apply in this case as well?
If yes, then will the formula for $\gamma$ be modified to use $c'$, or should we still use $c$ to calculate $\gamma$?
 A: @IndischerPhysiker has already answered the question, but I would like to bring forward an example of Cherenkov radiation - a phenomenon that occurs when a particle moves through the medium faster than the speed of light (in the medium), and raises precisely the question voiced in the OP:

Cherenkov radiation is electromagnetic radiation emitted when a charged particle (such as an electron) passes through a dielectric medium at a speed greater than the phase velocity (speed of propagation of a wave in a medium) of light in that medium. Special relativity is not violated since light travels slower in materials with refractive index greater than one, and it is the speed of light in vacuum which cannot be exceeded (or reached) by particles with mass.

Update
The way I would answer the question is: the speed of interactions is invariant. In vacuum the speed of light (i.e., the product of the wavelength and the frequency) is the same as the speed of interactions, but not in a medium, because the medium responds to the fields of the electromagnetic wave. But the speed of interaction, e.g., between the wave and the medium is still the speed of light in vacuum. This appears paradoxical only when we treat the medium as continuous, whereas on microscopic level we are still in vacuum. Indeed, refractive index is but a simplification for describing the field that is a superposition of the original light wave and the polarization and magnetization induced by this wave in the environment:
$$
\mathbf{E} = \frac{1}{\epsilon_0}\left(\mathbf{D}-\mathbf{P}\right),\\
\mathbf{B} = \mu_0\left(\mathbf{H}+\mathbf{M}\right).
$$
A related issue is the difference between the phase velocity, $v_{ph}=\lambda\nu=\omega/k$ and the group velocity, $v_g=\partial \omega(k)/\partial$ - the phase velocity can exceed the speed of light in vacuum, but the group velocity cannot - it is the latter that corresponds the the speed with which information propagates. In vacuum or dispersionless medium $\omega(k)=ck$ and the two velocities coinside.
A: The relative speed of light in water was first determined by Fizeau who found experimentally that it depended on the motion of the medium. The combination of Fizeau's result and the null result of the Michelson-Morley experiment was the impetus for the development of special relativity. So the answer to your first question is that the speed of light in a medium does depend on the relative motion of the observer and medium and is not invariant.
The answer to your second question is that we always use the invariant speed $c$ for calculations of the Lorentz transformation. $c$ is usually called "the speed of light", but it's more accurately referred to as "the speed of light in vacuum". It would be even better to call it "the speed of gravity" because that might help to avoid some of the misconceptions around light being special, but for historical reasons "speed of light" seems to have stuck.
A: The short answer to the first question is no. The point is to understand that light does not have to be given the special pedestal we give it while analysing problems such as above. Anything moving at a speed $c$, be it a photon or any other particle would follow the second postulate of relativity. On the other hand  photons which don't travel at $c$ due to being in a medium are just normal particles whose velocities have to be added by relativity-
$$v_x'=\dfrac{v_x-v}{1-vv_x/c^2}$$
The answer to the second problem is yes, they will apply exactly the same way. The second postulate of the special theory says that anything moving at $299,792,458$ m/s moves at that speed irrespective of how you move. The lorentz transformations are normally derived for photons, but any particle moving with a speed $c$ would be enough, since the postulate is about the speed of light, not light itself.
The formula for $\gamma$ = $1/\sqrt{1-v^2/c^2}$ to be used in time dilation / length contraction will still use c and not c'
