I have frequently seen two different definitions of polynomial-time reduction. In the following let $A, B \subseteq \Sigma^*$ be decidable problems. I will try to formulate the definitions in my own words:
Definition 1: $A \le_{p_1} B$ iff there exists a polynomial-time computable function $f\colon \Sigma^*\to\Sigma^*$ such that for all $w\in\Sigma^*$:
$$\begin{equation} w\in A \iff f(w) \in B.\tag{1} \end{equation}$$
Definition 2: $A \le_{p_2} B$ iff assuming we have a Turing Machine $M$ which solves $B$, there exists a Turing Machine $M'$ which may call $M$ as a subroutine a polynomial number of times and is also polynominal-time besides of calling $M$, such that the resulting function $f$ defined by $M'$ satisfies $(1)$ for all $w\in\Sigma^*$.
Question 1a: Are these two definitions equivalent? Clearly $\le_{p_1}$ is at least as stronger as $\le_{p_2}$. I would assume it is strictly stronger, because clearly $L^2 \le_{p_2} L$ for any Problem $L$, however I wouldn't assume the assertion holds for $\le_{p_1}$.
Question 1b: What if we restrict our problems to be in $NP$ (and assume $P\neq NP$)? Does that change anything? For the same reason I would assume no.
Question 2: What is the correct definition? I think definition 2 is the correct one which confuses me because most textbooks I have seen use definition 1.