Driving the vehicle for any distance with the engine operating, after the oil warning light comes on - is not a good idea.
The oil light comes on due to loss of oil pressure in the engine, and the details you have provided - in terms of the oil pan drain plug coming loose, and low oil level - it is likely to have damaged the engine bearings.
An engine overhaul, rebuild or replacement now seems like your only logical choices.
You can have the engine tested (compression test, and cylinder leakdown test), but with the sounds and condition you have described - leave little doubt the engine is damaged.
Obtain several detailed, written quotes for each of your three options;
1) rebuild (overhaul) your existing engine,
2) replace your engine with remanufactured,
3) replace your engine with a different, used engine
Shop according to warranty, and labor costs - with consideration for: overall vehicle condition, and how long you plan to keep and drive the vehicle.
Try these websites for comparison; www.rockauto.com,
The choices vary in cost with used engines ranging from $500-$800, to remamufactured engines around $3,500
This cost is for the engine only - not including labor for installation, or any needed parts; engine mounts, belts, hoses, water pump, gaskets, seals, etc.