Absolutely. Although there are TV antennas that are specifically designed for harsh marine environments, any antenna will work. I tend to recommend a plastic-clad antenna like this Televes DigiNova Boss UHF/VHF Amplified HDTV Antenna with LTE Filter (144180) from Solid Signal because its metal parts are hidden from salt water more than other antennas are.
Basically, the same rules apply when you’re talking about TV on the water as they do on land: You have to be within signal range (30-45 miles in the case of this antenna), you have to have a clear line of site to the towers, and you have to be going under about 10 miles per hour. That speed limitation is something you’ll deal with in all digital TV antenna broadcasts and it’s something that’s sort of baked in. It is technically possible to create antenna systems that work at virtually any speed but no one has done them, possibly because of the high cost of development and relatively small market.
But then again, that shouldn’t present too much trouble as most folks only watch TV when there’s nothing to do on the water. It’s a nice pleasant diversion before going to sleep, for example. At that point the boat’s not moving much, and you should be fine. The only concern here is really making sure the antenna is properly pointed, and in this case I’d think it’s probably just as easy to rotate the entire vessel in order to get a good antenna signal.