Where does it state that in the rules, by Tom elsewhere, or in a previous Magistrates case verdict?
Seems to me it's self-evident.
The rule is against realm mergers—that is, against one realm
effectively ceasing to exist by a significant majority of its lands and nobles transferring to another existing realm.
There is no rule against a Duke taking a Duchy to another realm if it does
not qualify as a realm merger. If there were, we'd just remove the bloody option, now, wouldn't we?