Hi, I have been on a handful of Carnival ships first bringing my children as young as two. Never had an issue bringing them into any dinner or formal nights despite thier attire was not as formal as one might feel necessary. NEAT and dressed nicely but hardly cocktail dresses. This I found to be the case with MOST of the other travelers with young children. A polo with dress slacks is very appropriate. The only usual rule followed are no shorts or jeans during dinner. During formal nights..most parents are dressed but the young children in tow are in nice dresses and slacks.
You'll be fine. enjoy