Effectively, you can't, and even in the source code of Ancestris, it would be very difficult to implement this (because the Java source is overly complex with deeply intricated routines).
There is an alternative. Using the calcs setting for the display of Individuals (little man icon on the top right corner of the Dynamic tree view).
For example, I want to flag the persons that are my direct ancestors. I'm using the <mark path=INDI:_SOSA> tag. The font color property controls the color of the mark (here it is red) :
<font color=#f00><mark path=INDI:_SOSA></font>
<i><b><prop path=INDI:_SOSA><b></i>
<b><prop path=INDI:NAME:SURN></b>
<br><prop path=INDI:NAME:GIVN>
<i><prop path=INDI:TITL></i>
<br>o <prop path=INDI:BIRT:DATE> <prop path=INDI:CHR:DATE> <prop path=INDI:BIRT:PLAC format="">
<br>+ <prop path=INDI:DEAT:DATE> <prop path=INDI:DEAT:PLAC format="">
So that I can quickly see where they are in the tree, with this red mark.
Fred