Kit’s suggestion about checking the EGR valve is a good one.
However, in a 17 year old vehicle with 150,000 miles I’d want to look closely at the cat converter. The function of the converter’s first stage is to seperate the NOx into nitrogen and oxygen, its two components, in order to reduce NOx output and to provide free oxygen for the rest of the converter to perform eom other emission-reducing chemistry. It does this by passing the exhaust through a platinum-palladium coated honeycomb. The platinum-paladium seperates the NOx molecules that come in contact with it.
If the coating on the honeycomb is contaminated, it will not perform this function effectively and the NOx readings will be higher than they should be. This often happens because as the engine wears and begins to burn a bit of oil the oil residue coats the platinum-palladium. On a car this age with this milage it would not be unusual.
The mechanic may have told you that he cannnot guerantee it’ll pass because he has little way of checking the performance of the converter itself. On newer cars there is an oxygen sensor before the cat converter and one after, and the two signals can be compared, but on your car there’s none after the converter. A comparison cannnot be performed.
Back to Kit’s comment. Excessive NOx, along with preignition, can be produced when the cylinders get too hot. The EGR valve allows recirculation of a bit of inert exhaust gas when the engine is placed under load to displace some oxygen and prevent the cylinders from getting too hot. That reduces the formation of NOx molecules. Too much oxygen can also cause a temperature rise, and that’s where his lean operation comment comes into play. Retarding the ignition can reduce heat too, but that becomes a performance tradeoff.
In short, on this vehicle with its age and miles I’d be inclined to try an aftermarket direct-fit converter. It’s old enough for the honeycomb to be coated.