Yes. The domain of the transition function $\delta$ of the PDA is given by
$$Q\times (\Sigma\cup\{\epsilon\})\times(\Gamma\cup\{\epsilon\})$$

The input of the PDA is thus a 3-tuple $(q,a,b)$, where $q\in Q, a\in\Sigma\cup\{\epsilon\}, b\in\Gamma\cup\{\epsilon\}$.

If the character at the top of the stack is different, the input to the transition function is different, and it can give different outputs in each case. You can have, as per your example, something like

$$\delta(q_0,a,a)=(q,b)$$
$$\delta(q_0,a,b)=(q,a)$$

where $q_0,q\in Q$ and $a,b \in \Sigma$ and $a,b\in \Gamma$.

Such examples are often found in the transition functions, such as [in this example][1].

The transition is not with regards to just the input symbol, it depends on all the three values, the state, the input symbol, and the symbol on the top of the stack, which form the input.


  [1]: https://en.wikipedia.org/wiki/Pushdown_automaton#Example