A district that enrolls a non-exchange foreign student (one with an F-1 visa) is required by federal law to charge tuition, P.L. 104-208, Illegal Immigration Reform and Immigrant Responsibility Act of 1996.
A district that enrolls a foreign exchange student (one with a J-1 visa) may charge tuition. However, the district may waive collection of tuition for students on J-1 visas based on the "nonresident children ... residing temporarily" in the district language of Iowa Code section 282.1. (Waiving tuition does not allow the district to count the student on a J-1 visa as a resident student for purposes of state foundation aid.) This answer deals exclusively with non-immigrant students; that is, students who are not residents of the United States and who are in this country temporarily.
If a student who is not a citizen of the United States nevertheless lives in Iowa with his or her parents, the school district of residence is required to provide a tuition-free education to that student. This is true even if the parents of the student are in this country illegally. See Supreme Court's 1982 decision in Plyler v. Doe, 457 U.S. 202, 102 S.Ct. 2382, 72 L.Ed.2d 786 (1982).