DNA is a molecule of matter. What makes each of our's unique is how the molecules components are assembled.
If the sequence of your DNA can be determined, the sequence could be recorded pretty much anywhere.
Think of DNA as the recipie for your favorite cake. You don't need to carry around a piece of the cake to let people know which is your favorite. As long as someone can read the recipe they can make one any time they want to.
It's the recipe that would be encoded onto forms of ID, not the cake.

And it's not only possible but it is done. The U.S. military encodes a portion of some military member's DNA onto their current ID cards.