Yes-try retrain 1st
Your child is old enough for medication, but best try other methods first like restricting fluids after supper and taking to toilet after couple of hrs.
Best proven cure is bedwetting
alarm. This attaches to underpants and buzzes +/or vibrates to wake child. In time child "hears" alarm before it goes off and they either wake or hold it in. Meds are; demopressin(ddavp
), Imipramine or oxybutininer.