“before all the assembly of Israel, and the women.” This is a good example of the cultural exclusion of women in the culture. The women were often included but not spoken of as if they are included. In this case, “all the assembly of Israel” did not include the women.
“and the foreigners who walked in their midst.” The foreigners were included. The phrase “in their midst” has the word “near” in it, and the Bible makes a difference between foreigners who were “near” and those who were “far away.” [For more on “near” and “far” see commentary on Lev. 1:2 and Eph. 2:13].