The answer to the question the way it is formulated is **no**, because if $\varepsilon<\delta$ and $f(x)=ax$ for some small $a$ we would have that $f$ equals identity on $B(\delta')\setminus B(\varepsilon)$ which is not the case. It is however, clear what OP had in mind and in fact the following general  gluing result is true:

>**Theorem.** *Let $\Omega\subset\mathbb{R}^n$ be open and let $D_1$ and $D_2$ be $C^k$-closed balls, $k\in\mathbb{N}\cup\{\infty\}$, such that $D_2\subset\mathring{D}_1\subset D_1\subset\Omega$. If $F:\Omega\to\mathbb{R}^n$ and $G:D_2\to\mathbb{R}^n$ are orientation preserving diffeomorphisms (onto the images) satisfying $G(D_2)\subset F(\mathring{D}_1)$, then there is a $C^k$-diffeomorphsm $H:\Omega\to F(\Omega)$ that agrees with $F$ on $\Omega\setminus \mathring{D}_1$ and with $G$ on $D_2$.*

By a $C^k$-closed ball we mean the image of $\overline{B}(0,1)$ under a diffeomorphism defined in a neighborhood of $\overline{B}(0,1)$, and by a diffeomorphism of a $C^k$-closed ball $D$ we mean a map that extends to a diffeomorphism in a neighborhood of $D$.

The above result is Corollary 1.4 in [GGH].
It follows from the Palais extension theorem [P], see also https://mathoverflow.net/q/439635/121665. 





[P] <cite authors="Palais, Richard S.">_Palais, Richard S._, [**Extending diffeomorphisms**](https://doi.org/10.2307/2032968), Proc. Am. Math. Soc. 11, 274-277 (1960). [ZBL0095.16502](https://zbmath.org/?q=an:0095.16502).</cite>

[GGH] *P. Goldstein, Z. Grochulska, P. Hajłasz*,
[**Gluing diffeomorphisms, bi-Lipschitz mappings and homeomorphisms**][1]. arXiv:2404.13508 (2024).


  [1]: https://arxiv.org/abs/2404.13508