Will it protect your head from the sun (surely the most important consideration)? Yes.
Will it prevent you from sweating? I don't wear hats of any sort but I did resort to buying a baseball cap in Washington the other year during a heatwave and I found I sweated more, I suppose it depends on the individual.
What would you normally wear? If you do wear a particular style of headgear then continue with that.
Will you likely stand out as an American if you wore a baseball cap? Possibly? Will anyone care? No. Should you care? No.
Rome is constantly full of tourists from all around the world. No-one is paying any attention to anyone else (unless they're particularly attractive) or what they're wearing, they're too busy absorbing all the sights. I've seen many American's in Rome, did I care about what they were wearing? Absolutely not, why on Earth would I? Honestly, it's a complete non issue. Those nay sayers are probably still stuck in the era of National Lampoon's European Vacation.
I am possibly one of the most stubborn people when it comes to clothing, if it's 16c+ then it's shorts weather (I just don't like long trousers/jeans). If that means I'm in shorts in Sorrento in February when it was 18c+ whilst all the locals were still wrapped up in winter coats, hats and scarves then inevitably I'll receive some odd looks but so what? It didn't bother me, it had no bearing on my holiday and I did not know these people. I was comfortable in shorts, they were comfortable in winter clothes, each to their own.