Legalities aside, projector boxes are the only ones you should use for replacement LED bulbs. These provide a final horizon “cut” for the light and thus reduce the possibility of blinding oncoming drivers. Note that the projector housing for halogen lamps is not the same as the projector housing designed for xenon or LED lamps. so your LED refills for halogen projectors won’t put out as much light as proper LED projector boxes.
Reflector headlights simply scatter the light 360 degrees, so while this is fine for halogen bulbs that have a rapid drop in light distribution, LED will look like a long, continuous beam to future drivers. Usually the high beam is a separate, more powerful bulb that works in conjunction with the low beam. Normally, you can safely replace it with LED as it will only turn on when it’s the right time to use it, but if yours also acts as a DRL, then no, you can’t.