While a professor would be better, a lecturer should be fine, especially if they hold a doctorate. You want letters from people who know you well enough to make a prediction about your future success, and so a lecturer with whom you have interacted may be a good choice.
The letters need to speak both about your past accomplishments and about your potential for success. Choose the best people for that.
I would worry a bit if the person doesn't have a doctorate, however, unless they are also currently in a doctoral program. They need some experience in the situation you are applying for. But a lecturer - current doctoral student probably will work nearly as well. Note that I have a few misgivings about the last statement. Think hard about it if this is the actual case.