The odor will still remain after shedding since body odor has a strong genetic basis and is influenced by the body activities. If a smelly person is as a result of being dirty, that means the odor is as a result of accumulation of sweet on the skin. When shedding occurs, the dead skin cells will just retain the smell.
Since the sweat is secretion of body waste, bacteria can harbor in it. So when the shed skin cells from a dirty person are inhaled, it will cause harm to the person who inhaled it.