I've never thought or heard of that, but theoretically yes?
However most of this happens before birth, and thymus infection is pretty unlikely at that point - the baby is protected by the mom's antibodies and is also physically sequestered. If the unborn baby has a thymus infection I would be more worried about what the mother has.