Yes, you can assign DM pin to any DQ pin location in a DQS group as the Quartus® II Fitter treats DQ and DM pins in a DQS group equally for placement purposes. The pre-assigned DQ and DM pins in Cyclone® III and Cyclone IV device pinouts are the preferred pins to use.
Device Family: Cyclone® III, Cyclone® III LS, Cyclone® IV E, Cyclone® IV GX
Area: EMIF, Intellectual Property
IP Product: DDR2 SDRAM Controller supporting ALTMEMPHY