I assume the music file is in mp3 format. Open it with Audacity, then cut out the 20 or 30 secs you want and save it as mp3 too (I also assume your phone can use mp3 as a ringtone format). You then bluetooth it over to the phone.
To get Audacity to support saving as mp3, you will need to get LAME :