This is not true even if $A$ and $B$ are assumed to be commutative, for some trivial reasons.
For example, let $A = k[t, s]/(s)(s-t)(s-2t)$, which represents three lines on a plane concurrent at the origin, and let $B = k[t, s]/(s)(s-t)\times k[t, s]/(s-2t)$, which is a partial resolution of $A$. There is an obvious (diagonal) morphism $A\to B$, which is injective and becomes bijective after inverting $t$.
Set $C = k[t, s]/(s-t)(s-2t)$. We got a natural surjection $A\to C$ as well. Now put $M = C$ as an $A$-module.
We have then $A_0 = A/tA\cong k[s]/(s^3)$, $B_0 = B/tB = k[s]/(s^2)\times k[s]/(s)$ and $M_0 = M/tM = k[s]/(s^2)$.
Now the $A_0$-module $M_0$ extends uniquely into a $B_0$-module, which must be supported on the first factor of $B_0$, namely $k[s]/(s^2)$. However, the $A$-module $M$ does not extend to a $B$-module, since otherwise $M = (0, 1)M \oplus (1, 0)M$ would be decomposible, which would imply $M$ was decomposible as $A$-module, and then as $C$-module, contradicting the fact that $C$ is connected.
I guess one should at least impose some connectivity assumption on the generic fibers.
response to the comment (edited 16.8.2017)
I made a serious mistake in my previous response: $M_0$ need not be irreducible.
I doubt that the condition $\mathrm{End}_{A_0}(M_0)=k$ is enough.
I address the problem in some special cases here by strengthening the hypothesis on endomorphisms:
- Every subquotient $N$ of $M_0$ satisfies $\mathrm{End}_{A_0}(N)=k$.
Proof.
By replacing $A$ (resp. $B$) with its image in $\mathrm{End}_{k[t]}(M)$ (resp. $\mathrm{End}_{k[t]}(M)[t^{-1}]$), we regard it as a $k[t]$-subalgebra.
First, we study the central fibers. We denote $\bar M = M_0$ and $\bar A=$ the image of $A$ in $\mathrm{End}_k(\bar M)$
- Take a Jordan-Hölder filtration $0 = F_0\subseteq \cdots\subseteq F_r = \bar M$.
- Since $F_1$ is irreducible, it acquires an induced $\bar A/\mathrm{Rad}(\bar A)$-module structure. Let $\bar e\in \bar A/\mathrm{Rad}(\bar A)$ be the idempotent corresponding to $F_1$. We lift it to an idempotent $e_1\in \bar A$. We claim that $e_1\bar M\subseteq F_1$ (thus $e_1\bar M=F_1$ by irreducibility). Suppose $e_1\bar M\subseteq F_i$ and $e_1\bar M\not\subseteq F_{i-1}$. Then $F_i/F_{i-1}$ considered as irreducible $\bar A/\mathrm{Rad}(\bar A)$-module must correspond to the idempotent $\bar e$. Thus $F_i/F_{i-1}\cong F_1$. The composite $F_i\to F_i/F_{i-1}\cong F_1\subseteq F_i$ gives an endomorphism of $F_i$, which by hypothesis is equal to a scalar. This implies $i=1$.
- We have $(1-e_1)F_i \cong F_i/ F_1$ and it acquires a $(1-e_1)\bar A(1-e_1)$-module structure. On the module $\bar M/F_1$ there is an induced Jordan-Hölder filtration $0 = (1-e_1)F_1 \subseteq \cdots \subseteq(1-e_1)F_r = (1-e_1)\bar M$.
- Repeating 2. and 3., with the ring $(1-e_1)\bar A(1-e_1)$, the module $(1-e_1)\bar M$ and the new filtration, we get idempotents $e_1, ..., e_r$ such that $e_ie_j = 0$ for $i\neq j$, and that $e_i\bar M \subseteq F_i$, $e_i\bar M \cong F_i/F_{i-1}$ via the canonical projection. Consequently, we have decomposition $\bar M = \bigoplus_j e_j \bar M$ and $F_i = \bigoplus_{j\le i} e_j\bar M$. We denote $\bar M^i = e_i\bar M$ and $\bar A^{ji} = e_j\bar Ae_i$. The algebra $\bar A$ decomposes into subspaces $\bar A^{ji}\subseteq \mathrm{Hom_k}(\bar M^i, \bar M^j)$.
- Let's show that $\bar A$ is the "parabolic subalgebra" of $\mathrm{End}_k(\bar M)$ with respect to the filtration $(F_i)_i$.
- For $1\le i < j \le r$, we have $\bar A^{ji}\bar M \subseteq e_jF_i = \bigoplus_{l \le i} e_je_l\bar M = 0$. So $\bar A^{ji} = 0$ as the module $\bar M$ is faithful.
- For $1\le i=j\le r$, the $\bar A^{ii}$-module $\bar M^i$ is irreducible. By Jacobson density theorem, $\bar A^{ii}\cong \mathrm{End}_k(\bar M^i)$.
- For $1\le j < i\le r$, the space $\mathrm{Hom}_k(\bar M^i, \bar M^j)$ has a natural $\bar A^{jj}$-$\bar A^{ii}$-bimodule structure, which is irreducible since $\bar M^i$ and $\bar M^j$ are. We claim that $\bar A^{ji} = \mathrm{Hom_k}(\bar M^i, \bar M^j)$. Suppose otherwise. We would have $\bar A^{ji} = 0$ by the irreducibility. Let $i$ be minimum with this property. Therefore $\bar A^{j, i-1} \cong \mathrm{Hom}_k(\bar M^{i-1}, \bar M^j)$. The multiplication $\bar A^{j, i-1}\otimes_k \bar A^{i-1, i}\to \bar A^{j, i}$ considered as restriction of $\mathrm{Hom}_k(\bar M^{i-1}, \bar M^{j})\otimes_k \mathrm{Hom}_k(\bar M^{i}, \bar M^{i-1})\to \mathrm{Hom}_k(\bar M^{i}, \bar M^{j})$ forces also $\bar A^{i-1, i}=0\subseteq \mathrm{Hom}_k(\bar M^{i}, \bar M^{i-1})$. However, this implies that $F_i/F_{i-2}\cong e_i(F_i/F_{i-2})\oplus e_{i-1}(F_i/F_{i-2})$ as $\bar A$-module, contradicting the hypothesis that $\mathrm{End}_{\bar A}(F_i/F_{i-2})=k$.
In recollection, we've seen that $\bar A = \bigoplus_{j\le i}\bar A^{ji}$ and $\bar A^{ji} = \mathrm{End}_k(\bar M^i, \bar M^j)$. Next, we lift the results to the $t$-adic completions $\hat A, \hat B$ and $\hat M$. We regard $\hat A\subseteq \mathrm{End}_{k[[t]]}(\hat M)$ and $\hat B\subseteq \mathrm{End}_{k((t))}(\hat M[t^{-1}])=\mathrm{End}_{k[[t]]}(\hat M)[t^{-1}]$.
Lift the idempotents $e^1, \cdots, e^r$ to idempotents $d^1, \cdots, d^r\in \hat A$, which is possible by the $t$-adic completeness. By modifying $d'_1=d_1,\; d'_2=(1-d'_1)d_2(1-d'_1),\; d'_3=(1-d'_1)(1-d'_2)d_3(1-d'_1)(1-d'_2)$, etc, we can make $d_id_j = 0$ for $i\neq j$.
Define as before $\hat A^{ji}= d_j\hat Ad_i$ and $\hat M^i = d_i\hat M$. Then
- For any $0\le i, j\le r$, since for each $s\in \mathbb{Z}$, the succesive quotient $t^s\mathrm{Hom}_{k[[t]]}(\hat M^i, \hat M^j)/t^{s+1}\mathrm{Hom}_{k[[t]]}(\hat M^i, \hat M^j)$ is isomorphic as $\bar A^{jj}-\bar A^{ii}$-bimodule to $\mathrm{Hom}_{k}(\bar M^i, \bar M^j)$, we have $\hat A^{ji} = t^{a_{ji}}\mathrm{Hom}_{k[[t]]}(\hat M^i, \hat M^j)$ for some $a_{ji}\in \mathbb{N}\cup \{+\infty\}$ (where $t^{+\infty}$ means $0$).
- By 5. and Nakayama lemma we see that $a_{ji}=0$ for $j \le i$.
- Similarly, write $\hat B^{ji} = d_j\hat Bd_i$. For any $1\le i , j\le r$, we proceed as in 7., so that $\hat B^{ji} = t^{b_{ji}}\mathrm{Hom}_{k[[t]]}(\hat M^i, \hat M^j)$ for some $b_{ji} \in \mathbb{Z}\cup \{+\infty\}$ and $b_{ji} \le a_{ji}$. The finiteness of $\hat B$ over $k[[t]]$ gives some bounds on these exponents:
- on the diagonal $b_{ii}=0$, since otherwise $t^{-1}d_i\in \hat B$ and thus $t^{-n}d_i = (t^{-1}d_i)^n\in \hat B$ for all $n\in \mathbb{N}$, impossible.
- off diagonal we still have $b_{ij} + b_{ji} \ge 0$, since otherwise the multiplication $\hat B^{ij}\otimes_{k[[t]]} \hat B^{ji} \to \hat B^{ii}$ gives $b_{ii} \le b_{ij} + b_{ji} < 0$. In particular, for $j > i$ we have $b_{ji} \ge -b_{ij}\ge -a_{ij} = 0$.
- We claim that the extension hypothesis on $M_0$ implies $b_{ji} = 0$ for $j < i$. As we already know $b_{ji} \le a_{ji} = 0$, suppose that $b_{ji} < 0$. The hypothesis says that the $k$-algebra homomorphism $\hat A\to \mathrm{End}_k(\bar M)$ factors through $\hat A\to B_0 \cong \hat B/t\hat B$. In particular, the ideal $t\hat B\cap \hat A$ falls into the kernel of the former. Since now $b_{ji} < 0$ and $a_{ji}=0$, we see that $\mathrm{Hom}_{k[[t]]}(\hat M^i, \hat M^j)\subseteq t\hat B\cap \hat A$ sends to $0$ via the reduction map $\mathrm{End}_{k[[t]]}(\hat M)\to \mathrm{End}_{k[[t]]}(\hat M) \pmod{t} \cong \mathrm{End}_k(\bar M)$, absurd.
- Now we have seen $b_{ji} \ge 0$ for all $1\le i, j\le r$, which means $\hat B\subseteq \mathrm{End}_{k[[t]]}(\hat M)$.
We've done, beacuse $B$, considered as subalgebra of $\mathrm{End}_{k[[t]]}(\hat M)[t^{-1}]$, is then contained in $\mathrm{End}_{k[[t]]}(\hat M)\cap \mathrm{End}_{k[t]}(M)[t^{-1}] = \mathrm{End}_{k[t]}(M)$, which extends $M$ into a $B$-module. Q.E.D.
I believe that the strengthened hypothesis is essential. We notice also that the extension of $M_0$ into a $B_0$-module may not be unique. I guess the uniqueness corresponds to the case where $b_{ji}=0$ (minimum possible) for those $b_{ji}\neq a_{ji}$.