If your definition of compactness is by sequences (which is an equivalent formulation in metric spaces) and the definition/characterisation of closed sets is by sequences, yes such a proof works.
You do use essentially that limits of sequences are unique : $x_n \to a$ and $x_n \to b$ implies $a=b$ for all sequences $(x_n)$.
So explicitly: suppose $(x_n)_n$ is a sequence in $C$ that converges (in $X$, the whole (metric) space) to $p$. As $C$ is (sequentially) compact, there is a subsequence $(x_{n_k})_k$ of $(x_n)_n$ and a $c \in C$ such that $x_{n_k} \to c$.
By the fact that we have a subsequence, we also know that $x_{n_k} \to p$ (this holds in all spaces: a subsequence of a convergent sequence converges to the same limit). Finally, by unicity of limits $p=c \in C$, so $ p \in C$ and $C$ is (sequentially) closed.
This only proves the statement "a compact set is closed" if you know you're in a context where sequentially compact is equivalent to compactness and sequentially closed implies closed. A valid context is metric spaces, as I said. But if you're required to prove this statement in a more general setting, you will need that $X$ is Hausdorff (or something close to it) and use coverings or use the above proof generalised to nets (using Hausdorffness too).