Yes. Rhode Island's DUI statute (RIGL section 31-27-2) covers any substance that impairs driving, including legal prescription medications like Xanax, Klonopin, Ambien, Oxycodone, Adderall, and Suboxone. A valid prescription is not a defense to the underlying DUI charge if the medication impaired your driving.
