The answer is going to depend on Country, State (if in the US) and locality. For a US based answer, you can contact he US Department of Labor and ask them for a real answer (certainly better than you'd get asking people on the internet). You can also contact the Department of Labor for whatever State the work is performed in.
At a guess, it's probably legal under certain circumstances. Knowing most small businesses, the policy is probably not that nuanced.