My weld shop washroom's fan is vented indoors
If the area is covered by International Building Code, then yes it must be vented outdoors.

International Mechanical Code 2015
Chapter 5 Exhaust Systems
Section 501 General
501.3 Exhaust discharge. The air removed by every mechanical exhaust system shall be discharged outdoors at a point where it will not cause a public nuisance and not less than the distances specified in Section 501.3.1. The air shall be discharged to a location which it cannot again be readily drawn in by a ventilating system. Air shall not be exhausted into an attic, crawl space, or be directed onto walkways.