Can an LED Driver be mounted in a Ceiling Electrical box
There is nothing wrong with a lamp having an internal DC power supply. 

There is also nothing wrong with embedding a DC power supply in a junction box, provided there is a separator between mains AC voltage and DC.  For instance many furnace transformers are packaged as the lid to a standard junction box, or to fit in a standard knockout, with the AC power inside and the DC power outside.  I am unaware of any 12V LED power supplies in those packages, but I haven't really looked.