Denis Cheryshev opened the scoring as Real beat the third-tier side 3-1 in the first leg of their last-32 tie.
The Russian winger should have been serving a ban - imposed while he was on loan at Villarreal - but he and Real say they were not told before the game.
The club said they would take "the appropriate action" to ensure a "favourable" outcome.
Real have won the competition 19 times, with their last success in 2014.
The Royal Spanish Football Federation's (RFEF) competition committee judge, Francisco Rubio Sanchez, said the club had fielded an "improper line-up" and the tie was settled "in favour of Cadiz".
Real were also fined 6,001 euros (£4,300).
The Spanish giants said in a statement: "The competition judge acknowledges that Cheryshev was not personally notified about his ban.
"Real Madrid CF can verify the acknowledgement that the Spanish Football Federation did not personally notify Cheryshev about his ban, which is the only way the ban can take effect.
"We at Real Madrid CF stand by our argument and will take the appropriate action to ensure that the final outcome is favourable for the club."
Spanish newspaper Marca reported Real will appeal to the RFEF and, if necessary, the country's sport court, TAD.
Cheryshev, 24, was substituted just after half-time, when Real had realised their error. Coach Rafael Benitez said they wanted to "show good faith".
Osasuna were expelled from last year's competition for fielding an ineligible player, and Benitez was in charge of Valencia when they were disqualified from the 2001 competition for selecting too many non-EU players in a tie.