I use 'Alarm Clock' by iHandSoft from the App Store.
Unless I'm not understanding your question right, you want to be able to lock the phone and still have the alarm go off right?
If so, this app does it as I do this every day for my wake up alarm. I would be suprised if any alarm app didn't support this.