Proof of Ascoli's theorem In the Section 45 of Munkres' Topology, after the classical form of the Ascoli's Theorem have been proven, the author gave an exercise to show the proof is still valid if $\Bbb{R}^n$ is replaced by any metric space in which all closed bounded subspaces are compact.
The classical form of the Ascoli's theorem is as follows:

Theorem. Let $X$ be a compact space and let $(\Bbb{R}^n,d)$ denote the $n$-dimensional Euclidean space with the Euclidean metric. Suppose the space $C(X,\Bbb{R}^n)$ is equipped with the uniform topology. Then a subset $\mathcal{F}\subseteq C(X,\Bbb{R}^n)$ has compact closure if and only if $\mathcal{F}$ is equicontinuous and pointwise bounded under $d$.

The sketch of the proof is as follows:

Sketch of Proof. ($\Longrightarrow$). Suppose that the closure ${\rm Cl}(\mathcal{F})$ is compact. Then it is clearly totally bounded and equicontinuous. In particular, it is bounded so we have $\rho(f,g)\leq M$ for every $f,g\in{\rm Cl}(\mathcal{F})$ where $\rho$ is the sup metric. Then it follows that ${\rm Cl}(\mathcal{F})$ is also pointwise bounded. Since $\mathcal{F}\subseteq{\rm Cl}(\mathcal{F})$, the collection $\mathcal{F}$ is also equicontinuous and pointwise bounded.


($\Longleftarrow$). Assume that $\mathcal{F}$ is equicontinuous and pointwise bounded under $d$. Then it suffices to show that ${\rm Cl}(\mathcal{F})$ is complete and totally bounded. The completeness of ${\rm Cl}(\mathcal{F})$ follows from the completeness of $C(X,\Bbb{R}^n)$. As for the total boundedness, we can easily show that ${\rm Cl}(\mathcal{F})$ is equicontinuous and pointwise bounded as well. Then we can find a closed ball $Y$ large enough centered at origin containing all $g(X)$ where $g\in{\rm Cl}(\mathcal{F})$. The total boundedness of ${\rm Cl}(\mathcal{F})$ follows from the following lemma:


Lemma. Let $X$ and $Y$ be two compact spaces where $Y$ is metrizable by $d$. If a collection $\mathcal{F}\subseteq C(X,Y)$ is equicontinuous under $d$, then $\mathcal{F}$ is totally bounded under both the uniform and sup metrics corresponding to $d$.

As far as I can see, the proof used the property of $\Bbb{R}^n$ twice.
On the one hand, it used the completeness of $\Bbb{R}^n$ when proving the completeness of ${\rm Cl}(\mathcal{F})$, because the completeness of $\Bbb{R}^n$ implies the completeness of $C(X,\Bbb{R}^n)$. Since ${\rm Cl}(\mathcal{F})$ is a closed subspace of $C(X,\Bbb{R}^n)$, it is also complete.
On the other hand, it used the Heine-Borel property of $\Bbb{R}^n$; that is, every closed and bounded subspace of $\Bbb{R}^n$ is compact, to show that the union of $g(X)$ where $g\in{\rm Cl}(\mathcal{F})$ is contained in some compact space of $\Bbb{R}^n$ in order to apply the lemma.
If we replace $\Bbb{R}^n$ by an arbitrary metric space $Z$ satisfying Heine-Borel property, apparently the second part will still go, but I doubt whether the first part is valid. If $Z$ is not complete, can we still deduce that ${\rm Cl}(\mathcal{F})$ is complete?
There are several extensions of this result, depending on the application. Here is a version that works in many settings:
Theorem: Let $(X,\tau)$ be a compact topological space and let $(S,d)$ be a complete metric space. $\mathcal{F}\subset\mathcal{C}(X,S)$ is relatively compact iff
$\mathcal{F}$ is equicontinuous and $\{f(x):f\in\mathcal{F}\}$ is relatively compact in $S$ for each $x\in X$. (metric in $\mathcal{C}(X,S)$ is defined as $\rho(f,g)=\sup_{x\in X}d(f(x),g(x))$.
Here is a paper that has a beautiful proof of the result as quoted above.
Section 2 (preliminaries) of the paper contains very nice ideas that you may find useful
If $Z$ is not complete, you can find a counter example to the property using constant functions : Take some bounded subset $C$ of $Z$. Consider the constant functions with values in $C$. This defines an equicontinuous family of pointwise bounded maps. But its closure is not complete.