I thought that ALL 6th gen Accords came with the F23A1 engine, which was a SOHC VTEC.
In any case, I think it's only illegal to swap in an older engine depending on which state you live in. California, yes. Here in Colorado, no. Could be wrong, though.
However, if I'm wrong, you could always swap in an OBD2 H22A. Problem solved.