There are many Apps on the app store that allow you to do this. And as for it being safe, Apple have to approve every app that goes on the store so they wouldn't let it it on without it being safe.
If you are using an iPod Nano or Classic the to turn it safely into a flash drive then all you have to do is, whilst your iPod is connected to iTunes, click on the tick box at the bottom of the page whilst on the information page of your iPod and check the box that says something like "use as disk".
As for still being able to play music, the iPod will still be fully functional.
Hope this helps!