How to handle specular highlights with reflection / total internal reflection in a ray tracer?
But, at this point, do i apply a specular highlight to the surface that i hit from the inside?


Unless you have a light source inside your object, there's no point in doing lighting on the inside surface as you'll hit the object again before you reach the light or environment.

If you want to support a light in the object, then by all means do your lighting but make sure to trace rays to check that you actually reach the lights without exiting the object.

Otherwise, that lighting should come from your (internal) reflected ray which will eventually hit the surface again, be refracted and get light from the outside.


  which ray should i use for the lighting - the refracted ray or the reflected ray, or both?


I think the confusion here is that when you write of "calculate a specular highlight" there is an assumed BRDF which may not make much sense for refraction. At least probably not without a few tweaks. What you really need is a BTDF (bidirectional transmittance distribution function).

If you want to keep it simple, I think you could adapt a Blinn-Phong model for refraction by using the half vector of equation (16) in Microfacet Models for Refraction through Rough Surfaces.