Reassembling rear wheel hub
Yes, that bolt was the closing side of the ball bearings, your current axle is probably a "cup and cone" hub.

You opened the cup, so the ball bearings that where rolling on the cone just fell off.

You have to replace them (same diameters and possibly same hardenss ...), clean and grease all the parts (rusty and not rusty, it does not really matter).

Finally, you can replace the axle with a quick release skewers, but it must be of the same (internal) length as the one you are replacing (130mm, probably).

Giving the exact bike model or at minimum a picture of the wheel&amp;hub may help us help you.