After the edit clarifying what you meant: (original answer, and full derivation of the limit, afterwards)
First, let us re-derive your "formula with $e$."
You have $\lim_a f^g = e^{\lim_a g\ln f}$, by definition and continuity of $ \exp$ (as long as one of the RHS or LHS exists, both do and they are equal). Now, if $\lim_a f =1$, then $\lim_a (f-1) =0 \ln f= \ln( 1+(f-1)) = (f-1)+o(f-1)$ (at $a$, using the Landau notation "little-o"), so
$$\lim_a f^g = e^{\lim_a [ g(f-1) + o(g(f-1)) ] }.$$
If $g(f-1)$ is bounded around $a$, as it is in particular the case if it converges to a finite value, then you get
$$\lim_a f^g = e^{\lim_a [ g(f-1) + o(1) ] } = e^{\lim_a g(f-1)}.$$
Back to the specific instance you have: In your case, $g(x) = \frac{1}{x-a}$ and $f(x) = \frac{\sin x}{\sin a}$, so that $f(x)-1 = \frac{\sin x-\sin a}{\sin a}$; and
$$
g(x)(f(x)-1) = \frac{\sin x-\sin a}{x-a}\frac{1}{\sin a}\xrightarrow[x\to a]{} \sin'(a)\cdot \frac{1}{\sin a} = \frac{\cos a}{\sin a}
$$
by definition of the derivative of $\sin$ at $a$.
So indeed, by the above you get your limit: $e^{\frac{\cos a}{\sin a}}$.
But again, you can only use a result if you are able to argue it applies... (see also remark in the original answer) this is a fundamental aspect of mathematical proofs -- otherwise, you are following a cookbook, not writing a proof..
Let's see. I assume that by "that formula with $e$" you mean
$$
\lim_{x\to\infty} \left(1+\frac{1}{x}\right)^x = e \tag{1}
$$
The short answer is:
No. If you have any doubt, or don't know whether such a result apply, then clearly you are not "allowed" to use it. You can only use things whose application you are able to justify.
Now, to deal with your limit and see what one can do: when $x\to a$, writing $x=a+h$ with $h\to 0$ (I prefer limits around zero, as a rule)
$$\begin{align}
\left(\frac{\sin x}{\sin a}\right)^{\frac{1}{x-a}}
&= \left(\frac{\sin(a+h)}{\sin a}\right)^{\frac{1}{h}}
= \left(1+\frac{\sin(a+h)-\sin a}{\sin a}\right)^{\frac{1}{h}} \\
&= \exp \frac{1}{h} \ln\left(1+\frac{\sin(a+h)-\sin a}{\sin a}\right)
\end{align}$$
Since $\sin$ is continuous, we have $\frac{\sin(a+h)-\sin a}{\sin a}\xrightarrow[h\to0]{} 0$, and therefore, using the fact that
$$
\frac{\ln(1+u)}{u}\xrightarrow[u\to0]{} 1,
$$
we get
$$
\frac{1}{h} \ln\left(1+\frac{\sin(a+h)-\sin a}{\sin a}\right)
=
\frac{1}{\sin a} \frac{\sin(a+h)-\sin a}{h} \frac{\ln\left(1+\frac{\sin(a+h)-\sin a}{\sin a}\right)}{\frac{\sin(a+h)-\sin a}{\sin a}}
$$
By the above, the last factor has limit $1$ when $h\to 0$; the limit of the middle factor is exactly the definition of derivative of $\sin$ at $a$, i.e. $\cos a$. So overall,
$$
\frac{1}{h} \ln\left(1+\frac{\sin(a+h)-\sin a}{\sin a}\right)
\xrightarrow[h\to0]{} \frac{1}{\sin a}\cdot \cos a \cdot 1 = \frac{\cos a}{\sin a}
$$
and by continuity of the exponential,
$$
\exp \frac{1}{h} \ln\left(1+\frac{\sin(a+h)-\sin a}{\sin a}\right)
\xrightarrow[h\to0]{} \boxed{e^{\frac{\cos a}{\sin a}}}.
$$