You possibly (only possibly) can go through a marriage ceremony, but it will give you no rights to remain in the US - you will have to leave and will not be allowed back in again without a visa.
You will cease to be eligible for visa waivers after your marriage as your visit is no longer as a tourist.