Is it ok having a ground wiring loose in the light fixture?
No. If a ground wire is present, it has an intended function. 

Pigtail the lamp and box wires together with the grounding conductor in the cable.