Can a PRF distiguisher invoke the function's algorithm? The definition of a function $F:\ \{0,1\}^n\times\{0,1\}^n\to\{0,1\}^n$ being a Pseudo Random Function Family (PRF) is that it's implementable by a P.P.T. algorithm $\mathcal F$, and there is no P.P.T. algorithm $\mathcal A$ able to distinguish $x\mapsto F(k,x)$ from a random function for unknown random $k$ and non-vanishing probability.
Is the algorithm $\mathcal A$ allowed to invoke the algorithm $\mathcal F$ implementing $(k,x)\mapsto F(k,x)$? Or even more generally, part of it?

That seems necessary to decide if the following $G$ is a PRF or not.

Let $H:\ \{0,1\}^n\times\{0,1\}^n\to\{0,1\}^n$ be a PRF.
Let $P_c:\ \{0,1\}^n\to\{0,1\}^n$ be a PRP with key fixed to arbitrary constant $c$, with both $P$ and ${P_c}^{-1}$ computable by a P.P.T. algorithm.
Define $G:\ \{0,1\}^n\times\{0,1\}^n\to\{0,1\}^n$ by (assimilating bitstrings to integers per big-endian convention)
$$G(k,x)\underset{\text{def}}=\begin{cases}
{P_c}(k\bmod2^{\lfloor n/2\rfloor})&amp;\text{if }x=0^n\\
1^n&amp;\text{if }x=1^n\text{ and }P_c^{-1}(k)&lt;2^{\lfloor n/2\rfloor}\\
H(k,x)&amp;\text{otherwise}
\end{cases}$$

Essentially, $G$ is the PRF $H$, except it has a set of weak keys $k$ of size $2^{\lfloor n/2\rfloor}$, such that whatever $k$, $G(k,0^n)$ is a weak key; and when $k$ is a weak key, $G(k,1^n)$ is $1^n$.
We can build a distinguisher for $G$ that

submits $x=0^n$, gets $y$
applies the algorithm for $G$ to input $(y,1^n)$
tests if the outcome is $1^n$, which will always be the case for $G$, and only with vanishing  probability for a random function.

However there seems to be no distinguisher if we can neither apply the algorithm for $G$, nor analyze it to extract $c$.

Motivation is this question, which asks if $F_2(k,x)\underset{\text{def}}=F(F(k,0^n),x)$ is a PRF, assuming $F$ is a PRF. If the above $G$ was a PRF, $F=G$ would be a counterexample.
The adversary $\mathcal{A}$ is allowed to invoke the algorithm $\mathcal{F}$ (if it is P.P.T.) in any PRF definiton known to me.
We are generally interested in security against every possible P.P.T. algorithm $\mathcal{A}$ and require that for every such algorithm $\mathcal{A}$ it holds that $\mathcal{A}$ can only distinguish from a random function with non-negligible probability.
If $\mathcal{F}$ is a P.P.T. algorithm, there exists an adversary $\mathcal{A}$ that includes the $\mathcal{F}$ functionality. This adversary is able to invoke $\mathcal{F}$ and we require from our PRF, that it is secure against that adversary too.
The same argument holds for parts of the algorithm $\mathcal{F}$.

As far as I understood it, for your example the important question is the following:
Does the adversary $\mathcal{A}$ know $c$?
Again, we need indistinguishability against all adversaries from a PRF, which means that we need indistinguishability even against an adversary that knows this fixed $c$.