you can be on anything in the military, as long as the military gave it to you and there is a paper trail. also, it can be a civilian prescription as long as the military has paperwork on it. they will have the final say on if you can continue on it or not.
i was on leave and had an ear infection and went to a civilian hospital and they gave me tylenol with codeine. i was like 'SCORE!', but when i came back from leave i have to give my corpsman the paperwork, and also kept a copy for myself for when it came time for the urinalysis.
when it comes time to pee in the cup, you'll want to bring along the paper work and document that in the 'notes' or 'other' section when you sign your name. sometimes medications will show up as opiates or worse, depending on the drug prescribed (i dont know what accutane consists of, so i cant say what it will show up as on a piss test). you DONT want to pop on a piss test, especially it was prescribed to you.
good luck