Grossly elevated combustion temperatures, failed EGR, lean AFR, or failed/failing catalytic converter can all cause high NOx.
Elevated combustion chamber temperatures may be caused by lean burning (which pushes flash temperatures up,) deposits in the cooling system (which inhibit heat transfer,) or deposits in the combustion chamber (which can not only inhibit heat transfer, but retain heat in their own right!)
A lean AFR will also result in zero measurable HC and CO - since you're not getting enough fuel to combine with all the air, the oxygen will be aggressive. Since you still have measurable HC and CO, we can probably rule out lean burning (another Sx of lean burn will be elevated operating temperatures.)
I don't know if your engine/year will have an EGR valve - if it does, a simple test is to open the valve manually at idle - the engine should stall out. If it doesn't, replace the valve or clean the passages.
The catalytic converter is a two-stage (three-way) device - one stage finishes the combustion of HC and CO, the other reduces the NOx to N2 and O2. One stage may fail with the other continuing to work (I believe the NOx reduction stage is first, this provides free oxygen to finish combustion.)
I'd probably consider a replacement of the cat (probably lost the reduction stage,) and clean out the combustion chambers - I've detailed how to do that with just a spray bottle of water/alcohol mix, you should be able to find it with a brief search & some creativity.