On the most basic level, as others have pointed out, an H-1B holder can be a co-founder of a startup. (not S-Corps though!)
Something that hasn’t been mentioned is a relatively recent change to the U.S. immigration laws which makes it possible for a co-founder of a startup to be eligible for an H-1B visa if their employment is solely up to the company. This is a change from the historical requirement of inactivity by the foreign co-founder. Because the board of directors can directly control or influence the employment of the co-founder, then he or she may be eligible for an H-1B visa if they meet the other criteria. Direct control / influence means that the board can hire, fire, supervise, pay, and more.
The process of making a foreign co-founder an employee is complex and the knowledge and insight offered by an attorney is invaluable. I work at a startup with a mission to make lawyers more affordable, accessible, and transparent. We can connect you with an experienced immigration lawyer on-demand at. Feel free to reach out directly if you have any further questions.