Madrid jump above Sevilla, Real Betis and Real Sociedad - all four of them with 21 points - on goal difference while Osasuna sit sixth after extending their strong start to the season.
The veteran striker went on as a 71st-minute substitute with Rayo 1-0 ahead.
The Colombian's last club was Turkey’s Galatasaray where he played from 2019 until the end of last season.
Romelu Lukaku is new Chelsea no 9: Morata, Falcao and three others who wore the iconic jersey at Stamford Bridge
Now that Tammy Abraham has moved to Serie with AS Roma, Lukaku will be donning the no 9 shirt for Chelsea -- a shirt that has not been lucky for many players.
James put the Cafeteros in the lead with a spectacular effort from the edge of the penalty area in the 36th minute, thrilling a largely pro-Colombia crowd at Raymond James Stadium.
The South Americans, led by forward stars Radamel Falcao and James Rodriguez, start their Group H campaign against Japan on June 19 in Saransk.
Colombia opens Group H on Tuesday against Japan, plays the second game near its Kazan base against Poland on June 24, and concludes against Senegal on June 28.
Falcao, who had come off the bench, took a touch just inside the Caen half on the edge of the centre circle to find the middle of the net.
Kylian Mbappe watched on from the bench as Radamel Falcao struck a hat-trick in Monaco's 4-1 victory over to Dijon.