Not only no restrictions, it is commonly done. One extreme would be integrally reinforced heavy wall nozzles, in between are long weld neck nozzles, and then there's the VIII Div. 1 mandated Standard wall minimum (UG-45) which instantly becomes XS or Sch 40 or Sch 60 with any corrosion allowance. You may have a vessel with 0.0625" corrosion allowance shell fabricated of 0.375" plate but if you attach a 12" nozzle the minimum allowable thickness for the nozzle would be 0.4375" which kicks you into a XS nozzle which is 0.500" thick. So just to meet code you shall have a nozzle thicker than the shell.