Find $(M,\partial M)$ with injective $H_k(\partial M)\rightarrow H_k(M)$.

For three dimensional manifolds there are no examples. Here I assume $M$ is orientable and $\partial M$ is connected. Then looking at the long exact sequence of the pair, we get $$0\to H_2(M)\to H_2(M,\partial M)\to H_1(\partial M)\to H_1(M)\to H_1(M,\partial M)\to 0$$ Let $a$ be the rank of $H_2(M)$ and $b$ the rank of $H_2(M,\partial M)$. Then by Poincare-Lefschetz duality, $b$ is the rank of $H_1(M)$ and $a$ is the rank of $H_1(M,\partial M)$. Let $c$ be the rank of $H_1(\partial M)$. Then since the sequence is exact, the Euler characteristic is $0$, meaning $c=2b-2a$. Now if $H_1(\partial M)\to H_1(M)$ were injective, then $H_1(M)\cong H_1(M,\partial M)$ by the above sequence, implying $b=a$. But then $c=0$. I think you can generalize this to higher dimensions but I'm running short on time.


Cheerful Parsnips argument generalizes to higher dimensions: Again assume that $M$ is orientable and $\partial M$ is connected. Denote $a_i=\mathrm{rank}(H_i(\partial M))$, $b_i=\mathrm{rank}(H_i( M))$, $c_i=\mathrm{rank}(H_i(M,\partial M))$, then by Poincare duality for $\partial M$ we have $a_i=a_{n-1-i}$ and by Poincare-Lefschetz duality for $(M,\partial M)$ we have $b_{n-i}=c_{i}$.

Assuming that $H_k(\partial M)\rightarrow H_k(M)$ is injective, the long exact sequence for the pair $(M,\partial M)$ breaks up into two pieces and yields $$ 0=\sum_{i=0}^k (-1)^ i a_i - \sum_{i=0}^k (-1)^ i b_i + \sum_{i=0}^k (-1)^ i c_i $$ and $$ 0=\sum_{i=k+1}^{n-1} (-1)^ i a_i - \sum_{i=k+1}^n (-1)^ i b_i + \sum_{i=k+1}^n (-1)^ i c_i. $$ Change indices in the latter equation and use the duality results to obtain $$ 0=\sum_{i=0}^{k-1} (-1)^ i a_i + \sum_{i=0}^k (-1)^ i c_i - \sum_{i=0}^k (-1)^ i b_i, $$ where the sign changes are due to the fact that $n$ is odd and $n-1$ is even. Subtract this from the first equation, then $$ a_k=0 $$ follows.


EDIT: In the comments it was claimed that $d:=\mathrm{rank}\left(\ker(H_k(\partial M)\rightarrow H_k(M)\right)=\frac{1}{2}\mathrm{rank}H_k(\partial M)$, this also follows by taking the long exact sequence for $(M,\partial M)$ and spitting it into:

$$\dots \rightarrow H_{k+1}(M,\partial M) \rightarrow\ker(H_k(\partial M)\rightarrow H_k(M)) \rightarrow 0 $$ and $$ 0\rightarrow \ker(H_k(\partial M)\rightarrow H_k(M)) \hookrightarrow H_k(\partial M)\rightarrow H_k(M) \rightarrow \dots $$ and then doing essentially the same computations as above to obtain $a_k-2d=0$.