Valerie Trierweiler's message on Twitter also put her at odds with President François Hollande, who has declared his full support for Socialist Royal's electoral bid.
Trierweiler, a twice-divorced 47-year-old journalist, tweeted that she wished "good luck" to Olivier Falorni, a Socialist dissident competing with Royal for a parliamentary seat for the western town of La Rochelle.
Royal has refused to comment on Trierweiler's tweet, while Falorni said he was "delighted" at the unexpected support.
Hollande was Royal's unmarried partner for decades and is the father of her four children.
He stood at her side during her 2007 failed presidential bid even though he had been in a relationship with Trierweiler since 2005.
Reports of rivalry between the two women led to speculation, which Trierweiler denies, that the current first lady had Royal airbrushed out of a film screened to Socialist faithful at Hollande's January campaign launch.
Hollande, who is not married to Trierweiler, has publicly thrown his weight behind Royal, writing that she is "the only candidate of the presidential majority who can be assured of my support".
Socialist party leader Martine Aubry was in La Rochelle on Tuesday to support Royal's bid in the second round of parliamentary elections on Sunday.
Royal came first in the first round on Sunday with 32,03 per cent of the vote ahead of Falorni with 28.91 per cent. The two will face each other in a run-off on Sunday.
Aubry described Royal as “honest’ and “sincere” and said she was sure she would be celebrating her win after Sunday’s vote.