A police office stops you and says, " I need to see your identification right now". Or, " Show me your identification right now". Is the officer asking you to voluntarily do something or is it a legal command? There is the problem... you probably won't know (can't know) unless you either ask or refuse. If the officer asks you to land when possible and then asks to see the registration number, if you simply do this (most would), it could just be a request... not something you legally need to do. Same as an officer knocking on your door and ask if he/she could come inside and look around. You can refuse but you can also voluntarily allow them in. They are not breaking the law.
I'm 100% for people sticking up for their rights. If an officer asked me to land to check my registration, if I could I'd land then and do it. If I was in the middle of something important I might ask if he/she could wait just a couple of minutes so that I could land safely. In the OP's case I'm betting the officer would not have seen an issue. A different situation might be an officer telling me that I can't take a photos of a building. In that case I'd point out that the 1st amendment allows me to do this and offer some push back. In that case I'm standing up for my (and everyone's) rights.
Could the OP have refused to show the registration number?.