A policy can be canceled if the insured property is sold. Agents simply need to provide a signed cancellation form and legal documentation such as the settlement paperwork showing the title transfer of the property to the company that sold the flood insurance policy.
Another option would be for the buyer to assume the sellers current flood policy.