Yeah, you can freely wear a Yukata in and around your ryokan, including to the bath, meals, and as sleepwear. In onsen resort towns like Kinosaki, Dogo, and Kusatsu, you can even walk around in your Yukata and geta (wooden sandals). No one will judge!