And it says the opposite, treat foreigners from other countries and living among you as the people groups you can kidnap slaves from
Lev 25: 44-46 "As for the male and female slaves whom you may have, it is from the nations around you that you may acquire male and female slaves. 45 You may also acquire them from among the aliens residing with you and from their families who are with you who have been born in your land; they may be your property. 46 You may keep them as a possession for your children after you, for them to inherit as property. These you may treat as slaves, but as for your fellow Israelites, no one shall rule over the other with harshness.