See if this gives you what you want. Sort both data sets by ID and date. Then:
data want;
set treatment (rename=(trtdt=visitdt) in=new_treatment) assessment (in=keepme);
by id visitdt;
retain treatment;
if new_treatment then treatment = trt;
else if first.id then treatment=" ";
if keepme;
drop trt;
run;
Note that the treatment variable will now be named Treatment, not TRT.