Suppose in doubles match during the play if the shuttlecock is in mid air then is the player allowed to change the racket?
Yes, it is legal to change the racket during play. From the Recommendation to Technical Officials (RTTO) §188.8.131.52:
(...) change of a racket at courtside during a rally is permitted.
Notice the at courtside: At a tournament, there will be two boxes per side into which the players must put all their stuff. The players are allowed to lay out a new racket on top of the box. At a lower-level tournament, these might be wash baskets, marked lines, or simply "somewhere close to the netpost".
These boxes are where players get new rackets. They may also ask a coach to fetch a racket for them and take the racket off the coach near the court.
But outside the intervals (at 11 and between games), players must stay courtside (which means on the court or at most a couple of meters from it). In other words, going to the changing room or local badminton store during a rally is not allowed.
In practice, racket changes during play happen quite regularly. For instance, here is a 16 minute compilation video.