I had the same P21DD code come up about three months ago. My dealer ran the check and the DEF heater / pump assembly would need to be replaced...but it was on a nationwide back order. They cleared the code and let me know they would call when the part came in (they had 10 on order as a couple other trucks had the same code and needed the same part, plus they wanted some in stock). Approx a month later, they received a few heater / pump assemblies and replaced mine.
During that month wait, my check engine light did come back on a few times. I asked the dealer about the truck going into limp mode. They said there is a chance, but it should be a rare occasion from this issue. I wasn't too confident in their answer. They also stated, like Hillwood stated above, it will come up on the DIC and give you a number of miles before going limp...I think they said like a 50 mile "warning."
The dealer also knows I have a CTS2 monitor that will run and clear codes. They said to clear it if it returns. This will keep from driving it too long with an active code (CEL), thus reducing the chance of it going into limp mode. I never had any limp issues, limp warnings, etc...and my CEL was off when I took it in for replacement. Since it's been replaced, no further CELs have come up...
I would confirm your closest dealer has the part in stock. If so, see if they can put one aside for you so you don't waste a trip. If they don't have any in stock, see if they can order some now...
It should only take about an hour or two to replace if they have a good diesel mechanic.
I wouldn't worry too much about the limp mode. It sounds like you were able to read your code ? If that's the only code you are seeing, I'd clear it. If it comes up again, confirm it's the same P21DD and clear it again...
And yes, this part is covered under warranty. GM is having so many problems with our DEF / emission system, they extended the warranty on it. I believe I heard it was 10 years /125K miles...but double check that...