if you are trying to directly edit the files of the game, then the answer is no this is not going to work unless you edit the file for the dlc as there will almost certainly be loading order issues otherwise.
if you are making a mod it can work but you would have to re-direct who the unique unit or building is given to via the "TraitType" designation for the unit or building, or else you would have to give the "vanilla" civ or leader the trait that the unique unit or building is tied to if you want both civs to be able to use the unique. And you would have to make sure that the xml or sql code performing this re-direction loads after all the dlc code has been loaded into the game. And anyone who did not have the required dlc would not be able to even have the mod active in their list of enabled mods, as this would constantly send them back the main menu after pressing "start game" or "load game".