You can apply for a civilian residency that starts AFTER your active duty commitment is up - you can use leave to go to your interviews (or, if your leadership approves, ask for permissive TDY - probably a no go).
As far as applying for residencies during your active duty commitment time, that is a no go - if there's an existing military residency then that's the one you can apply for (the upside is that random civilians can't apply to military residencies). Sometimes, the military does outsource to civilian programs but that is based on lack of training program (ie pedo) or current needs being greater than what the military residencies can produce (that is always changing).
On a side note, why are you thinking of civilian residencies? The military residencies are world class and, in many ways, IMHO, far superior to anything out in the civilian side.