If the app is not the active running app, then, unless it meets strict criteria, it cannot start itself to perform such an action. There are a number of limitations for VOIP apps and music players to allow them to stay running, but in your case what would probably work best is a local notification that uses a custom notification sound. This allows you to register a notification for the time of the alarm which will be triggered regardless, as it will not be your app doing the work, but the OS instead which obviously maintains the notifications daemon at all times. Certainly for a "real" push notification you can then have a custom sound, I recall the demo at the relevant WWDC where an ESPN app used a clip of music from their TV channel as the sound, but I am unsure if you can acheive the same with a local one - I don't see any reason why not. Obviously there will be limits on file size and possibly length also, so a full track of music may not be possible.
Sound on iPhone is reasonably complicated when you get down and start "taking it apart". This is because it is managed on a very much case-by-base basis.
For example, if you call up Siri, and adjust the volume, it will only be adjusting the volume for Siri, not something like the ringer volume.
So to divide things up and try to answer your question, I'll start with the basics.
If you turn on Vibration mode (orange position) using the switch on the side of the phone it will turn off almost all sounds. Unlock, keyboards and such sounds will no longer be on. Notifications and phone calls will vibrate but not be heard. You will have to turn the switch off (no orange) in order to hear normal sounds while in apps - (i.e. games). When alternating vibration mode versus normal mode, iPhone remembers your previous state, and will set the volume to what it was before vibration mode was active.
Exception: alarms set in the Clock.app are still heard. In fact, there is no way to turn off Clock.app's alarms from being heard unless you turn off the alarm(s) itself. As for other alarm clock style apps (for example, Sleep Cycle), it is up to the developer to make it behave like Clock.app. That is the case with Sleep Cycle, but it would be worth verifying with any other alarm style app.
If you turn down the volume in the Music.app (or double tap home button and swipe to the right twice), or while watching a video, or in Settings.app, that is the volume that is applied across the board, mostly. That volume reflects the volume for videos, music, and apps that in general make noise - as in, games. Note that iPhone remembers your settings when you have headphones plugged in vs. not.
When iPhone is unlocked and you are on the home screen and you adjust the volume, you are adjusting ringer volume. In other words if the vibration switch is off (no orange) then that would be the volume it would ring at.
Do-not-disturb suppresses basically all notifications (there are some configuration options there). Again, alarms (from Clock.app, and other properly set up apps like SleepCycle) will stay play.
The only thing you can't do is have it toggle sound settings when it is plugged into the wall vs. when it is not. I think you will find it becomes habit, however, to throw the vibration switch.
Best Answer
As of iOS 8, the native Clock app supports selecting your own music. When selecting a sound, choose "Pick a song" at the top. Presto!