As per Law, when a person cancels his registration then he has to file return until and unless the department accepts the cancellation request.
But as in the last GST Council meeting it was changed that a person after filing the cancellation requeat, no need to file returns.(But no notification has been issued yet)
Also there is provision to file cancellation within 30 days of closure of business.
So considering all the above, firstly you will have to sell the whole stock or pay tax on the balance closing stock and after that you can apply for cancellation.
In my point of view, you have to file returns and it will ask for late fees also, then within 30 days you can cancel the registration.
If I am wrong, then pls rectify me