Neither one is necessary or required by Canon Law. Many priests take advantage of that fact to never wear a roman collar (not even celebrating Mass with the Bishop in one case), and some don’t wear their stole during confessions because “they don’t have to.”
I surprised a priest once, too. I was at an ordination about an hour or so before it was to begin and saw two priests sitting by a window talking, so I approached them and one of them must have figured it out because he walked up to me and asked what I wanted (but I think he knew). At any rate, off we went into a corner of the church and he heard my confession, without the purple stole (but he was wearing his collar).
At any rate, the priest does not have to wear a collar or stole, but if he’s in the confessional to hear confessions, there’s no reason he shouldn’t.