The reason that it is illegal to feed chickens mealworms in some countries is that the mealworms are supposed to be bad for the chickens and they don't need the protein from the mealworms according to some people.
In some countries it is illegal to feed chickens mealworms.
Not all countries make it illegal to feed chickens mealworms and even if they did there's not much they can do to enforce it if the chickens are your own chickens.
Now in a commercial setting where they check the conditions etc of the chickens housing and feeding situations then those farmers could get into trouble if they are caught feeding the chickens mealworms.
But if you want to feed your own chickens mealworms then feel free to do so as there's not much that can be done and in the USA as far as I know it's not illegal in the USA to feed chickens mealworms.
The chickens may actually eat the mealworms if they find them themselves.