Let $\lambda$ denote the Lebesgue measure on $\mathcal B(\mathbb R)$, $d\in\mathbb N$ and $p\ge1$.
Is there a continuous embedding $\iota_{A\to B}$ of $L^p\left(\left.\lambda^{\otimes d}\right|_A\right)$ into $L^p\left(\left.\lambda^{\otimes d}\right|_B\right)$ for all $A,B\in\mathcal B(\mathbb R^d)$ with $A\subseteq B$?
I would say that the answer is trivially yes, since we can simply extend by $0$ on $B\setminus A$ without losing measurability or integrability.
But is the same true for $L^p$ replaced by the Sobolev space $W^{k,\:p}$ for some fixed $k\in\mathbb N$, i.e. is there a continuous embedding of $W^{k,\:p}(A)$ into $W^{k,\:p}(B)$ for all open $A,B\subseteq\mathbb R^d$ with $A\subseteq B$?
For $L^p$-spaces, you're reasoning is correct: We may extend the functions by $0$ and get a continuous embedding.
In Sobolev Spaces, the same technique works if the Sobolev functions vanish on the boundary of the smaller domain $A$:
$$W^{k,p}_{0}(A) \hookrightarrow W^{k,p}_{0}(B)$$
You can easily check that the weak differentiability is not affected.
If we don't have zero boundary conditions, it depends on the regularity of the boundary of $A$ whether such an embedding exists.
Indeed, for nice enough - say Lipschitz - domains we have an extension operator $E$ that extends Sobolev functions to $\mathbb{R}^d$. You can then restrict them to $B$.
For irregular domains, the embedding fails.