yes...that is echolalia and it is VERY good. trick lies in modelling for hr ALWAYS how to speak correctly and cos' she is echolalic she will learn to do it correctly. within 6 months u will see the difference if you model intensively
what zumbaleena said. DD (5, asd and severe s&l delay) sounds similar to your DS. we model quite intensely for her and DD has now quite a good database of phrases which she can use correctly in contect.
My son does this too. It's weird cos sometimes I think it's an anxiety thing, he does it a lot more if he is stressed. But recently he also does it in context like you say. It's quite genius really! It's good to hear that it's a good sign.
My 3 year old copies phrases, and now puts them into use in appropriate context. We're trying to remember to model them correctly (so 'I want a drink' rather than 'do you want a drink') and to stop talking about ourselves in the third person now! It's a slightly odd way of learning language, but it's so much easier once she has a phrase she can use to ask for what she wants or tell us when something is wrong.