Which distribution is it? I recently came across the following distribution
$$
\Pr(X\le x)=e^{\tfrac{1}{a}-\tfrac{1}{x}}\left(\dfrac{a}{x}\right)^{\tfrac{1}{a}},\; 0\le x< a,
$$
and the cdf is 0 for all $x\lt 0$ and 1 for all $x\ge a$; here $a\gt 0$ is a parameter. Is this distribution a special case of some known distribution family, and if so, which one? It seems to be a truncated version of the Frechet distribution.

It's unusual.
Let  $\beta = 1/a$ and $Y = 1/X$ (supported on the interval $(\beta,\infty)$) so that, exploiting the continuity of this distribution, $$\Pr(Y\le y) = \Pr(X \ge 1/y) = \Pr(X \gt 1/y) = 1 - C(\beta)y^{\beta}e^{-y}$$
where $C(\beta)\beta^\beta e^{-\beta} = 1.$
Differentiating with respect to $y$ gives the density function defined on $(\beta,\infty)$ in the form
$$f_Y(y) = C(\beta)\left(\beta y^{\beta-1} - y^{\beta}\right)e^{-y}.$$
This is a signed mixture of two truncated Gamma densities with shape parameters $\beta$ and $\beta+1$ and unit scale parameter.  Such (untruncated) mixtures can arise as sums of Gamma distributions, as shown at https://stats.stackexchange.com/a/72486/919, so with a bit of algebra you should be able to express this as the truncation of a sum of two Gammas.
These characterizations don't hint at any common parametric family of distributions, so $X = 1/Y$ isn't likely to be part of such a family, either.
