No, according to FIDE's Laws of Chess, castling has to be done along the first rank.
3.8.2 by ‘castling’. This is a move of the king and either rook of the same
colour along the player’s first rank, counting as a single move of the
king and executed as follows: the king is transferred from its
original square two squares towards the rook on its original square,
then that rook is transferred to the square the king has just crossed.
184.108.40.206 The right to castle has been lost:
220.127.116.11.1 if the king has already moved, or
18.104.22.168.2 with a rook that has already moved.
22.214.171.124 Castling is prevented temporarily:
126.96.36.199.1 if the square on which the king stands, or the square which it must cross, or the square which it is to occupy, is attacked by one
or more of the opponent's pieces, or
188.8.131.52.2 if there is any piece between the king and the rook with which castling is to be effected.