It sure will, all kinds of oil will. A few links. All I did was google 'oil as rust prevention' and it gave me a huge amount of links to all kinds of oil based products.
Oil prevents rusting, because it naturally resists water by its very nature. Rusting occurs when oxygen molecules in water interact with the metal to form iron oxide, commonly known as rust.
However you do need to reapply every so often as oil will break down. I plan on doing my frame, 1st I'll remove what surface rust I can find and repaint then in a spray bottle I'll use my old motor oil and spray the frame so not to have a dripping mess.
On my Chevelle I had sprung a leak of gear oil from my tranny and where that oil is underneath the car there is no rust to this day. My Chevelle is a '70. This was about 1980ish when that happened and after time I realized the oil prevented rust. Being thick 80 weight gear oil it clung on forever where it sprayed. Motor oil's have rust inhibitors in it. Reason the inside of your engine doesn't rust unless you leave it sit for a long period of time. If you plan on leaving your vehicle in storage for a long time they recommend you fill it with oil. I mean totally fill it.
http://www.exxonmobil.com/lubes/exxonmobil/emal/files/RustPrevention_TTopic.pdf
http://www.ardisonsoils.com/ardisonsoils/7/rust-preventive-oil/products/
http://www.nynas.com/en/Segment/Oth...ic-oils-are-ideal-for-rust-preventive-agents/
http://www.sonneborn.com/products/n...-asia-pacific/visconorust-corrosion-inhibitor