M.C.
As far as formality, wear what you'd like to wear, and what you feel good in. I'm from upstate NY, and in general things are MUCH less formal there than here (you can still pick me out as a yankee--I'm the chyck who just went to church this morning without a bit of makeup on). By all means, wear a nice dress, but you'll probably see a range at the wedding, from folks really decked out, to folks, like me, who'll wear a nice simple black dress and consider it dressed up 'cuz I'd wear 2 inch heels (and then take those off and dance barefoot--LOL!). At the end of August, it will likely still be summer weather for there, but that means 75-80 during the day, 50's or 60's at night. There is never any time all year that I would leave the house without a sweater in the evening. Definitely bring a sweater or a wrap, or both. If you get a rainy day, expect a high in the 60's, and you'll want your jeans and sweatshirt. Officially, a heat wave in that part of the country is defined as 3 consecutive days with a high above 90. That happens once or twice a year. You might see it, but you probably won't. That being said, you also CANNOT count on everywhere having AC--my husband (from Mississippi) has complained that he's never been hotter than at my parents' house in July, when it's 85 and humid and no AC to be had (hotels and restaurants DO have AC, as do malls and stores and stuff, just most homes don't).
Okay, enough rambling about that. I do recommend a side trip to Toronto if you have time--and yes, you do now need your passport (this is new, within the last year or two, like for Mexico). NYC is great, but an 8 hour drive from Buffalo, so don't expect to just hop on over. Toronto is about an hour and a half drive. Have fun!