This fruit is a cheap and amazing option for pregnancy since it has so much water content. Just buy a whole melon, wash it well at home, and eat it immediately. Avoid buying pre-cut melons from outside to prevent infections.
Melons are absolutely safe and helped me a lot with hydration and digestion. Even after my C-section, my doctor advised fresh, light fruits to avoid constipation, so you can definitely have them.
When I was at my parents' place, my mother would cut fresh musk melon (kharbuja) for me every afternoon. It is super safe and keeps you hydrated, just make sure to wash the outer skin thoroughly before cutting it.