I was advised once to test on functionality rather than on class name. Like you said, the problem is that IEEEtran.cls defines \appendix. So only load the appendix package if there isn't already an \appendix defined.
\ifcsname appendix % do nothing \else \usepackage{appendix} \fi \ifcsame is available on all e-TeX builds and is documented (along with other ways to check if a command is defined) here.