Just to clarify the question, you are demanding that $f$ be total, i.e. that $f(M)$ terminate in all cases, even if $M$ does not terminate (otherwise we can simply run $M$ and return its output).
Relation to another question: This being said, question turns out to be the same as the one I asked here on MathOverflow about Turing degrees of sets separating theorems and negations-of-theorems (of Peano arithmetic), i.e., I was asking about a function that must return $1$ on a theorem, $0$ on a negation-of-theorem, and can return anything on undecidable statements (or indeed non-well-formed ones, but that's not interesting because well-formedness is trivially decidable anyway). Allowing it to return anything other than $0$ or $1$ is obviously irrelevant because we can always convert any other answer to $0$ (say).
The reasons why the question you ask (about terminating of Turing Machines) and the one I asked (about separating theorems and negations-of-theorems) are equivalent is that we can convert a machine $M$ to the ($\Sigma_1$) arithmetical statement “$M$ halts and returns $1$”, which is a theorem (of Peano arithmetic) if indeed $M$ halts and returns $1$ and its negation is a theorem (of Peano arithmetic) if $M$ halts and returns $0$; and conversely, we can convert a statement $\varphi$ (of arithmetic) to the Turing machine which searches for proofs of $\varphi$ and $\neg\varphi$ in parallel and returns $1$ if the former is found and $0$ if the latter is found.
The answer proper: Now the quick answer I received is that $f$ is not necessarily of degree $\geq\mathbf{0}'$, indeed it can be of low degree (that is $\deg(f)' = \mathbf{0}'$, which clearly implies $\deg(f) \not\geq \mathbf{0}'$) as follows from Jockush-Soare low basis theorem which states that every infinite computable subtree of the infinite binary tree $\lbrace 0,1\rbrace^*$ has a low infinite branch. (See, e.g., Cooper, Computability Theory (2004), theorem 15.4.3, or Soare, Turing Computability and Applications (2016), theorem 3.7.2, for proof and further explanations.)
So in the context of your question, you would do this: enumerate all Turing Machines in a sequence $(M_n)$ and then define a binary subtree $\mathscr{T}$ of $\lbrace 0,1\rbrace^*$ as follows: to decide whether a length $n$ binary word $w$ is part of $\mathscr{T}$, you run $M_0,\ldots,M_{n-1}$ for $n$ steps: if $M_i$ terminates during that time and returned $0$ or $1$, then the $i$-th letter of $w$ must equal that result (otherwise, the $i$-th letter of $w$ has no constraint). Clearly this is decidable, and clearly this is a tree (as constraints are only ever added); it is sometimes known as the (a?) Kleene tree. Now given an infinite branch of the tree, seen as an infinite binary word, we simply let $f$ on $M_n$ return the $n$-th letter of that word: this satisfies your constraints, because if $M_n$ terminates after $k\geq n$ steps, then no word of length $k$ in $\mathscr{T}$ will have an $n$-th letter that disagrees with the output of $M_n$, and in particular the infinite branch cannot have made that choice. So by the low basis theorem, there is an $f$ of low degree.
Further remarks: From Laurent Bienvenu's answer on MathOverflow, we also learn that the possible degrees of functions $f$ as you defined are known as PA degrees and that a number of things are known about them.
I guess this example disproves the common wisdom that proving uncomputability of something (already known to be computably enumerable) is always done by reducing the Halting Problem to that something (wisdom “justified” by the difficulty of exhibiting a natural degree intermediate between $\mathbf{0}$ and $\mathbf{0}'$, especially a c.e. one, a problem solved by the Friedberg-Mučnik theorem). The thing is that here $f$ is unconstrained at many values, so we're not defining a single degree but a class of them.
Note that in some generalizations of Turing degrees (I like to refer to Kihara's paper “Lawvere-Tierney topologies for computability theorists”, which I tried to give an account of on my blog (in French) and which generalizes Turing degrees in various ways up to Lawvere-Tieney topologies on the effective topos), we can define degrees for nondeterministic functions like this, and then we do have a natural intermediate degree between $\mathbf{0}$ and $\mathbf{0}'$, namely the one you defined (if we just say that $f$ is a nondeterministic function returning $0$ and $1$ when $M$ does not terminate returning $0$ or $1$), and is (equivalent to the one) called $\mathtt{LLPO}$ in Kihara's aforementioned paper (because of its relation to a principle of constructive mathematics).