We know that when a light ray goes from denser to rarer medium and the angle of incidence is greater than the critical angle, then it suffers total internal reflection. But does that light ray obeys the laws of reflection like angle of incidence is equal to angle of reflection etc. and the law of refraction like Snell's law at the same time?
Yes, it does.
In the described setup, for an incident angle smaller than the critical angle, the departing ray is closer to the interface (has a larger angle) than the incident ray; at the critical (incident) angle, the departing light ray would "run along" the interface; and for an incident angle greater than the critical value, there's total internal reflection, with the law of reflection (incidence angle = angle of reflection) being respected normally.