We're fairly confident that 2.0M and 2.0A will swap. Have been doing a lot of research lately and the ability to swap is wider than that. The 2.0 can in many cases be swapped with a 2.3/2.5 with some considerations, from either Ford or Mazda, since the Duratec is technically a Mazda Engine.
As Happy has said, the motor from the 2.0A will need the flywheel/clutch/spigot bearing transferred across, or new one's obtained. Nut from everything I've read you should be fine.
The engines through the years changed some things around 2005 they changed from external dipstick to one that routed through the block. The timing gear cover changed from containing oil galleries to later models not doing that. The intake cam position sensor wheel changed the number of cogs on it. But between 2006 and 2008 things had settled down, and there was even more commonality on the MAzda side.
Check this link:
Luke