This is dependent on HDB's regulations. Considering the hybrid nature of an EC (executive condominium), whether you can keep an inherited HDB flat or not in Singapore would depend on a few things:
If you are owning the EC as a foreigner, you cannot own a HDB flat. Assuming you are a Singaporean, generally speaking, you cannot own two HDB flats and cannot own an HDB flat if you already have a private property.
If your inherited HDB was bought before 30 August 2010, you may be able to keep both.
Read more: What Happens To My Stuff When I Die? (Singapore Edition), All About Probate & Administration (Singapore Edition), Immortalize x PropertyGuru Articles