A Riemannian manifold $(M, g)$ is said to be an almost Ricci soliton if there exists a complete vector field $X \in \Gamma(TM)$ and a smooth function $\lambda: M \to \mathbb{R}$ such that
$$\operatorname{Ric} + \frac{1}{2}\mathscr{L}_{X} g = \lambda g$$ When this vector field is the gradient of a smooth function $f: M \to \mathbb{R}$, we say $M$ is a gradient almost Ricci soliton, and this equation becomes:
$$\operatorname{Ric} + \operatorname{Hess}(f) = \lambda g$$
Obviously, any Einstein manifold is a Ricci soliton and hence an almost Ricci soliton (gradient as well, trivially), so these are trivial examples.

If $M$ satisfies: $$\operatorname{div}({\operatorname{Rm}}) = 0$$
we then say $M$ has harmonic curvature (notice this happens if and only if $M$ has harmonic Weyl curvature and constant scalar curvature. I think that part of some work I've been doing with some other people shows that any gradient almost Ricci soliton with harmonic curvature satisfies the property that for any $p \in M$, there is a neighborhood $U_p \ni p$ such that $U_p$ has constant sectional curvature (and is therefore necessarily Einstein) (**EDIT AT NOVEMBER 27:** this supposes the dimension is $\geq 4$. Also, I've come to realize since the initial writing of this post that the Einstein examples might not be exhaustive).

As a sanity check, I'm looking for some explicit examples of nontrivial (i.e, not Einstein and with nonconstant $\lambda$) gradient almost Ricci solitons (preferably of dimension $\geq 5$) with harmonic curvature. Can anyone here provide some examples? I'd appreciate any help. Thanks in advance!

nottrue that a gradient almost Ricci soliton with harmonic curvature is locally Einstein. There is a $3$-parameter family of mutually non-isometric, nontrivial examples $(g,f,\lambda)$ in dimension $3$ with the function $\lambda$ and the sectional curvatures not being constant. I haven't looked at higher dimensions, but I don't see why it would necessarily fail there. $\endgroup$