Thermal resistance - Temperature transistor
Your basic understanding is correct. You say a "very small" package...the calculation may be more complex depending on what package you select. You may need to calculate heat transfer through the device leads to the PCB as well as transfer from the case to the ambient air. You may want to have a look at Texas Instruments Application Report SPRA953B, "Semiconductor and IC Package Thermal Metrics".