Dzyaloshinskii-Moriya interaction (DMI) is investigated in a 2D ferromagnet (FM) with spin-orbit interaction of Rashba type at finite temperatures. The FM is described in the continuum limit by an effective s-d model with arbitrary dependence of spin-orbit coupling (SOC) and kinetic energy of itinerant electrons on the absolute value of momentum. In the limit of weak SOC, we derive a general expression for the DMI constant D from a microscopic analysis of the electronic grand potential. We compare D with the exchange stiffness A and show that, to the leading order in small SOC strength αR, the conventional relation D=(4mαR/)A, in general, does not hold beyond the Bychkov-Rashba model. Moreover, in this model, both A and D vanish at zero temperature in the metal regime (i.e., when two spin sub-bands are partly occupied). For nonparabolic bands or nonlinear Rashba coupling, these coefficients are finite and acquire a nontrivial dependence on the chemical potential that demonstrates the possibility to control the size and chirality of magnetic textures by adjusting a gate voltage.