You can, if you are not a foreign national.
Also, there are townhouses that are really condominiums and there are townhomes that are like homes. It is much easier to purchase a townhome (not a townhouse that is a condo).
When looking for a property, make sure to ask your agent about this.
While home insurance premium will be larger in townhomes, the hoa is normally lower, so this should work out to your advantage.
Hope this helps,
Beachfront Realty, Inc.