The only way for a duke to get named as a lord is if he assigns himself as a lord of a region in his own duchy. And no, he will not lose the duchy by naming himself as a a lord. That would be kind of silly.
But if he gets named Lord by another Duke, then he loses the Duke title?
Please reread the post you are quoting. Let me highlight the relevant portion:
The only way for a duke to get named as a lord is if he assigns himself as a lord of a region in his own duchy.
If he gets named Lord by another Duke, that's a bug that we need to fix. No Duke has
ever been able to assign someone as Lord who's not already in his Duchy.