I'd define \schwa
with a conditional:
\documentclass[10pt]{article}
\usepackage{fontspec}
\newcommand{\transcr}[1]{%
\textit{\transcrtrue #1}%
}
\newif\iftranscr % starts out false
\DeclareRobustCommand{\schwa}{%
\iftranscr\textsuperscript{ə}\else ə\fi
}
\begin{document}
In normal context, \schwa\ appears as it should.
In a different place it needs to be \transcr{sup\schwa rscript}, but it isn't
And then it doesn't appear as it should in normal context anymore: \schwa.
\end{document}

Since \transcrtrue
is issued in the group provided by \textit
, its effect is confined to it.
A slightly different approach allows for directly using ə
(but also \schwa
, if you prefer):
\documentclass[10pt]{article}
\usepackage{fontspec}
\usepackage{newunicodechar}
\newcommand{\transcr}[1]{%
\textit{\transcrtrue #1}%
}
\newif\iftranscr % starts out false
\newunicodechar{ə}{%
\iftranscr\textsuperscript{ə}\else ə\fi
}
\newcommand{\schwa}{ə} % must be done _after_ \newunicodechar{ə}{...}
\begin{document}
In normal context, ə appears as it should.
In a different place it needs to be \transcr{supərscript}, but it isn't
And then it doesn't appear as it should in normal context anymore: ə.
\bigskip
In normal context, \schwa\ appears as it should.
In a different place it needs to be \transcr{sup\schwa rscript}, but it isn't
And then it doesn't appear as it should in normal context anymore: \schwa.
\end{document}
You can also nest conditionals:
\documentclass[10pt]{article}
\usepackage{fontspec}
\usepackage{newunicodechar}
\newcommand{\transcr}[1]{%
\textit{\transcrtrue #1}%
}
\newcommand{\phon}[1]{%
\textbf{\phontrue #1}%
}
\newif\iftranscr % starts out false
\newif\ifphon % starts out false
\newunicodechar{ə}{%
\iftranscr
\textsuperscript{ə}%
\else
\ifphon
\textsubscript{/ə/}%
\else
ə%
\fi
\fi
}
\newcommand{\schwa}{ə} % must be done _after_ \newunicodechar{ə}{...}
\begin{document}
In normal context, ə appears as it should.
In a different place it needs to be \transcr{supərscript}, and it is;
likewise it could be \phon{supərscript}.
And then it doesn't appear as it should in normal context anymore: ə.
\end{document}

\textit{\renewcommand\schwa{\textsuperscript{ə}}#1}
should be the definition of\transcr
.