Can an instructor ask students to write a letter of recommendation for them (the instructor)?
As others say, there are good reasons not to get reference letters from students: they are biased to please you, don’t know how to write references, and it might be perceived as cherry picking (you’re in fact an awful teacher but one or two students like you). 

If you want to offer insights about what students think of you, why not use your teaching evaluations? If you’re indeed an excellent educator, this should reflect in your evaluations. It’s also acceptable to offer snippets from written course evaluations: while this is still a bit of cherry picking, at the very least it’s unbiased. However, I would check your institution’s policy regarding this practice. Some universities are ok with it, others may not be. 

Finally, if you want to show you’re a great educator l suggest indicating how you go the extra mile: participating and organizing student events, mentoring, volunteer work etc.

Good luck!