Here is an implementation that provides a \exinline command, taking a label argument to produce the relevant text.

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{exercise}[theorem]{Exercise}
\newcommand{\exinline}[1]{(\refstepcounter{theorem}Exercise~\thetheorem\label{#1})}
\begin{document}
\section{Euler's Theorem}
Some text.
\begin{theorem}[Euler]
\label{thm:Euler}
This is Euler's theorem.
\end{theorem}
\begin{proof}
The proof of this theorem is left as an exercise \exinline{ex:Euler}.
\end{proof}
\begin{exercise}
\label{ex:extra}
Reformulate the theorem.
\end{exercise}
Here is the solution to Exercise~\ref{ex:Euler}. By\dots
Note that Exercise~\ref{ex:extra} requires you to provide another formulation
of Theorem~\ref{thm:Euler}.
\end{document}
Note in this example Exercises and Theorems share the same counter. If that is not the case, you need to replace the theorem counter in definition with the appropriate counter, and change \thetheorem correspondingly. E.g. if exercises have their own number, declared
via \newtheorem{exercise}{Exercise}[section], the command definition should read
\newcommand{\exinline}[1]{(\refstepcounter{exercise}Exercise~\theexercise\label{#1})}
If you are using cleveref for references then a small modification is needed to the refstepcounter command so \cref picks up the correct name.
\documentclass{article}
\usepackage{amsthm}
\usepackage[capitalize]{cleveref}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{exercise}[theorem]{Exercise}
\newcommand{\exinline}[1]{(\refstepcounter[exercise]{theorem}Exercise~\thetheorem\label{#1})}
\begin{document}
\section{Euler's Theorem}
Some text.
\begin{theorem}[Euler]
\label{thm:Euler}
This is Euler's theorem.
\end{theorem}
\begin{proof}
The proof of this theorem is left as an exercise \exinline{ex:Euler}.
\end{proof}
\begin{exercise}
\label{ex:extra}
Reformulate the theorem.
\end{exercise}
Here is the solution to \cref{ex:Euler}. By\dots
Note that \cref{ex:extra} requires you to provide another formulation
of \cref{thm:Euler}.
\end{document}
This produces the same output as the first example, with cleveref correctly providing the names.