It has a plug to the junction and a small bulb near the socket. Cannot find replacement and want to know if the small bulb needs to be replaced? Or can it be eliminated? Will heat build up be a problem?
If by small bulb you might be talking about the thermal protection unit of the can. Like you said heat will be a problem. If corrected improperly then fire will be the worst case scenario. If the socket has gone bad then you might be able to find a replacement. But if the thermal unit (t/u) has gone bad, then that's another story. Some manufacturers will not sell these separately because if you put them in the wrong product they will not function the way the original t/u was designed. The only way to get the correct one is buy a complete can from a local supplier and change out the leads, thermal unit and socket, which means getting into the wiring compartment of the light. You can always replace the can, but that's more work than needed. Any doubt call a licensed electrician to do it.