"Do I need an operation?"
Translation:¿Necesito una operación?
The mistake is not that of having yo there ( I do not know what DL will accept, just talking about the language). The mistake is where you put it.
Though in Spanish the subject can be omitted, it is just a special case of grammar. Something like "because you can" simply because the verb will tell you the person. In German the situation is the same, but it is incorrect not to place the subject (just some trivia)
Now, a better way would be: ¿Necesito yo una operación? the rearranging due to the fact that you are in a question.
That said, it is possible to make questions in Spanish just by changing the tone ¿vas a venir tu mañana? if you remove tu, could be an order or a question, the intonation will tell you the rest. At least that is what you will hear and it is not entirely right.
Spanish has the right grammar tools to produce recognizable questions and there is only one reason not to do it: it's easier not to follow the grammar.
Thus keep on ;)
It is 'correct' but unnecessary use of subject pronouns, unless there is a clear reason, is usually seen as a rookie mistake. Necesito = I need