Note that in the above example the reported question has no auxiliary "do". But there is pronoun change and backshift.
Note that we sometimes use "whether" instead of "if". The meaning is the same. "Whether" is a little more formal and more usual in writing:
They asked us if we wanted lunch.
They asked us whether we wanted lunch