Yes, in fact, that's how it usually works. What this question is referring to is known as commercial surrogacy, gainful surrogacy, or compensated surrogacy. All three terms mean that the surrogate gets a financial compensation for carrying someone else's child. So, the answer is yes, a woman can carry and give birth to a baby for someone else and be paid a sum that should be established by contract beforehand.
Suggested for you: What Is Surrogacy & How Does It Work? – Everything You Should Know.