It's not something you can assign, but the "handle" in any object's entity data is unique, and remains constant no matter what, unlike its "entity name" which may be different the next time you open the drawing. Is that something you might be able to use?
The handle is a text string representing a hexadecimal number, so the string can include numerical characters as well as the letters A through F. One way get it from an object is with this AutoLisp expression:
(cdr (assoc 5 (entget (car (entsel)))))
and select the object.
If that is saved to a variable:
(setq test (cdr (assoc 5 (entget (car (entsel))))))
then:
(handent test)
returns the entity name, so that would qualify as "search[ing] for a specific unique ID within the DWG file." That can be used in object selection for command-based modifications you want to make, or its entity data can be manipulated in various ways, etc.
A routine could be written that would, for example, find all Block insertions, and write out their handles to a file, along with related information [Block name? insertion point? Layer?]. Then you could later pull the handle from that file to find that unique Block, to do with what you need.
If you're talking about something like using the same identifier for specific Blocks in different drawings [e.g. open up a bunch of drawings and change all the Blocks identified as "George" in some way], that couldn't be done directly with handles, because you can't assign those. But in writing out to a file, the identifier could be associated with the handle in some way. More detail about how you imagine keeping track of and making use of the identifiers would be helpful.
Also consider having an Attribute in your Block definitions, even an invisible one, that could hold your unique ID. In that case you could assign ID's as you desire, including with the same assignment to Blocks in different drawings, or even to multiple Blocks in the same drawing.
Kent Cooper, AIA