You can do that, provided your YANG module is using version 1.1, i.e. you have
yang-version 1.1;
somewhere near the top of your module. With that, you can restrict an enumeration type with a set of enums which must obviously be a subset of the base type’s enum set, see RFC 7950. So in your case, you can have
If this is not enough or YANG 1.1 is not an option, you can use identities instead, they are much more flexible (maybe too much flexible for your use case). Yet another option is the enumeration type combined with must statement; but I think this should be your last resort.