You could pass the ordered sequences to your RNN and reorder them afterwards to match your original ordering
Toy example:
A = torch.LongTensor([1,2,5,3,7,4])
sorted, reorder = torch.sort(A)
_, original_ordering = torch.sort(reorder)

sorted[original_ordering] will now be exactly the same as A.