Green and bare wires are always ground. Ground is a means of short circuit protection, and all metal parts in electrical systems and fixtures are grounded. If a hot wire shorts out and touches the enclosure for some reason, it flows to ground and the circuit breaker/fuse trips (typically this happens in nanoseconds).
Without ground, if there is a short, the metal parts become energized. Once you touch it, you form the path to ground and get electrocuted.
Old fixtures didn't always have this, but we got smarter after several electrocution deaths. Modern fixtures without exposed metal (eg made of plastic) or where any metal is mechanically insulated from the wiring may not have ground as well. Since this is meant to be hardwired, they won't have spent the time to make sure everything is isolated correctly, so absolutely it needs to be grounded.
So no, you should not just cap the ground off, you should get a new wire that includes a ground. If you are leaving the wire exposed (not in any walls), you would typically use SJO wire (aka "extension cord wire" -- which is flexible, and has all conductors in a round outer jacket) in this situation. Readily available at any hardware stores.
You'll also need a surface-mount junction box of some sort, with the SJO wire terminating into it through a strain-relief connector of some sort.
Wire color isn't a certainty, particularly with switched power. You need to be certain of how it was wired before and use the same configuration. Without that, you need to disconnect and use test equipment (non-contact tester, multimeter) to determine the neutral, hot line, which hot goes to the switch, and which hot is switched. A common convention would be black as always hot and red is a switched hot, but you need to test to be sure.
Once you have identified the wires, the light fixture will be connected to the neutral and switched hot. The hot from the line needs to go through the switch to become the switched hot. And neutrals should all be connected together.
Best Answer
The ground wires should not be with the white neutral, some folks see them on the same buss in the main panel and think it is ok to do it other places it is not.
I turn the power off and separate the grounds from the neutrals. Some fixtures do not have ground wires because they are made of plastic or nonconducting materials The grounds should be attached to the metal framework of the fixture or box.