We know that any formal system cannot completely pin down the natural numbers.
Incidentally, I said exactly this here. Besides what I said in that post, I wish to elaborate on the following points:
A generalized version of the Godel-Rosser incompleteness theorem shows convincingly that there is no practical formal system that can pin down the natural numbers. Specifically, we can easily write a program that, given any proof verifier program for any formal system that interprets arithmetic, will produce an explicit arithmetical sentence that can neither be proven nor disproven by that system. How convincingly? If we phrase the incompleteness theorem in a certain way, it can be proven even in intuitionistic logic. But we still need to work in some meta-system that 'has access to' a model of PA or equivalent, otherwise we cannot even talk about finite strings, which are the basic building blocks of any practical formal system.
The philosophical issue is that as far as the real-world is concerned, the empirical evidence suggests that there is no real-world model of PA, due partly to the finite size of the observable universe, but also the fact that a physical storage device with extremely large capacity (on the order of the size of the observable universe) will degrade faster than you can use it! So there is a weird philosophical problem with the preceding point, because if one does not believe that the collection of finite strings embeds into the real-world, then the incompleteness theorems do not actually apply...
On the other hand, there is undeniably huge empirical evidence that the theorems of PA when translated into statements about real-world programs are correct at human scales. Just for example, there is no known counter-example to the theorems underlying RSA decryption, which depend on Fermat's little theorem among other basic number-theoretic theorems applied to natural numbers on the order of $2^{2048}$. So one still has to explain the incredible accuracy of PA at small scales even if it cannot have a real-world model.
But suspending philosophical disbelief, and working in a weak formal system called ACA that practically every logician believes is sound (with respect to the real world), there are many things we can in fact say for sure (besides the incompleteness theorem), that would answer your question (if ACA is sound).
Suppose that for some particular Turing machine $Z$, I have proven that $Z$ halts [after some number $N$ of steps. H]ow can I know for sure that $N$ is a standard natural number and not a nonstandard one?
Your proof is done within some formal system $S$. If $S$ is $Σ_1$-sound (with respect to the real-world) then you can know for sure that $Z$ really halts. It is entirely possible that $S$ is not $Σ_1$-sound, and that you can never figure it out. For example, given any practical formal system $S$ that interprets arithmetic, let $S' = S + \neg \text{Con}(S)$. If $S$ is consistent, then $S'$ is also consistent but $Σ_1$-unsound. In particular, it proves that the proof verifier for $S$ halts on some purported proof of contradiction over $S$, which is exactly the type of question you are concerned about!
Worse still, the arithmetical unsoundness of a formal system can lie at any level of the arithmetical hierarchy, as constructively shown in this post. Precisely, if $S$ is $Σ_n$-sound then there is a $Σ_n$-sound extension of $S$ that is $Σ_{n+1}$-unsound.
These imply that it may be difficult to have confidence in the soundness of a formal system without some philosophical justification. Firstly, unsoundness cannot be detected by checking for a proof of inconsistency. Now, if $S$ is sufficiently expressive, we may be able to state "$S$ is arithmetically sound" over $S$, in which case we can check for a proof of its negation over $S$, and if so we know something is really wrong. But even for mere consistency, if we enumerate (endlessly) all possible proofs and never find a contradiction, we still have only enumerated an 'infinitesimal' fraction of all possible proofs, far too little to be sure that there really is no contradiction.
It gets worse. Consider the following:
Let $Q$ be some $Π_1$-sentence such that $S$ proves ( $Q$ is true iff there is no proof of $Q$ over $S$ with less than $2^{10000}$ symbols ).
It turns out that we can indeed easily construct such a sentence $Q$, using the standard Godel-coding tricks and the fixed-point theorem. What may be shocking to those unfamiliar with this is that $Q$ is actually quite short (less than a billion symbols if $S$ is something like ZFC), and if $S$ is $Σ_1$-complete, then $Q$ is provable over $S$ (because $S$ can check every possible proof with less than $2^{10000}$ symbols) but its shortest proof has at least $2^{10000}$ symbols!
Now let $T = S + \neg Q$, where $S$ has any reasonable deductive system. Firstly, $T$ is inconsistent. Secondly, the shortest proof of its inconsistency is on the order of $2^{10000}/len(Q)$, because it can be converted into a proof of ( $\neg Q \to \bot$ ) over $S$, which after a finite number of extra steps would give a proof of $Q$ over $S$.
In conclusion, a formal system could have a rather small description, but have an inconsistency whose proof is so long that we can never ever store it in the physical world...
Finally:
I appreciate that the answer to this might depend on the nature of the proof that $Z$ halts, which I haven't specified. If this is the case, which kinds of proof are susceptible to this issue, and which are not?
It should be clear from all the above that it is indeed the case. To repeat, you need the proof that $Z$ halts to be done within a formal system that is $Σ_1$-sound. How could you know that? Well we cannot know any such thing for sure. Almost all logicians believe that ACA is arithmetically sound, but different logicians start doubting soundness at different points as you climb up the hierarchy of formal systems. Some doubt full second-order arithmetic, called Z2, because of its impredicative comprehension axiom. Others think it still is fine, but doubt ZFC. Some think that ZFC is fine, but doubt some large cardinal axioms.