Yes! This would be a fantastic no-brainer. With Ilyasova in, they can get rid of Davis and use that money elsewhere.
Ilyasova rebounds better than Davis, shoots better from inside and outside the arc, and isn't the head case that Davis is (seemingly).
Ilyasova's size helps down low, though he can't play center like Davis did. How much of an impact player are the C's truly going to get at #25; not a back-up center. Might as well take a guy with size and experience under his belt.
If you're going to lose/give up on Davis anyway, there are much worse players you can swap in than Ilyasova. He would be a steal for the #25 pick.
And the kicker, Ainge can still buy another late-first rounder or early-second rounder. Nothing stopping him from doing that, other than Wyc.