Analyzing 24 mu m MIPS/Spitzer data and the [O II]3727 line of a sample of galaxies at 0.4 < z < 0.8 from the ESO Distant Cluster Survey (EDisCS), we investigate the ongoing star formation rate (SFR) and the specific star formation rate (SSFR) as a function of stellar mass in galaxy clusters and groups, and compare with field studies. As for the field, we find a decline in SFR with time, indicating that star formation (SF) was more active in the past, and a decline in SSFR as galaxy stellar mass increases, showing that the current SF contributes more to the fractional growth of low-mass galaxies than high-mass galaxies. However, we find a lower median SFR (by a factor of ~1.5) in cluster star-forming galaxies than in the field. The difference is highly significant when all Spitzer and emission-line galaxies are considered, regardless of color. It remains significant at z>0.6 after removing red emission-line (REL) galaxies, to avoid possible AGN contamination. While there is overlap between the cluster and field SFR-Mass relations, we find a population of cluster galaxies (10-25%) with reduced SFR for their mass. These are likely to be in transition from star-forming to passive. Comparing separately clusters and groups at z>0.6, only cluster trends are significantly different from the field, and the average cluster SFR at a given mass is ~2 times lower than the field. We conclude that the average SFR in star-forming galaxies varies with galaxy environment at a fixed galaxy mass.