Since the 2025 amendment, outsiders can't buy agricultural or horticultural land in 11 of the 13 districts, Dehradun included. For a house you can still buy up to 250 sq m, with an affidavit that you haven't bought other such land in the state.
What I'm not clear on is flats. An apartment isn't agricultural land, so it shouldn't be covered, but does the 250 sq m cap come into it at all? Anyone bought a flat in Dehradun recently as a non-resident?
Source: https://scroll.in/latest/1079495/uttarakhand-assembly-clears-bill-to-restrict-outsiders-from-buying-agricultural-land