If a child is mostly brain dead except the brainstem, would he still be able to suck his thumb?

Not if brain dead. Technically speaking a person is brain dead only if no brainstem function other than cardiac regulation exists. Thumb sucking in infants is a reflex which requires only brainstem function. So a baby not truly brain dead might suck his/her thumb.