A federal law banning sex bias in the workplace prohibits discrimination against transgender workers, a U.S. appeals court said on Wednesday, ruling in favor of a funeral director who was fired after telling her boss she planned to transition to female from male.