Formal nights on your cruise will be Sunday, July 20th, and Friday, July 25th. Surprised your agent didn't inform you about that.
As for tux rental, you'll see very few of these, if any, on formal nights. On our last Carnival cruise in December, I watched a guy walk in and sit down for formal night dinner wearing t-shirt, shorts, and flip flops!! You'll see many guys wearing golf shirts. I was among the minority wearing a coat and tie. So definitely don't feel like you have to get overly dressed up for formal night, unless of course you want to, and then feel free to go for it.