They could have used it against the British if they were to conduct Operation Sea lion.
Much (not sure of the exact numbers) of the French Navy was at sea at the time France fell to the Germans, or the ships and subs were stationed at still-protected French ports on the French coast and elsewhere globally, and those French Naval officers in charge of those ships were not going to just sail back to home ports in France with their cruisers, battleships, light cruisers, destroyers, submarines, support vessels, (anything that floated or was seaworthy, basically) and just willingly hand "the keys over to the enemy" who was in the process of trouncing their native soil.
Instead, the bulk of the French naval fleet steamed for "friendlier waters and ports", most notably locations in Great Britain or America. Heck, Churchill even issued a pretty blunt ultimatum to French ship commanders at the time, giving them the option of coming to English-friendly ports to be interned at those British ports or to face the prospect of being sunk by British forces - an act deemed required in order to ensure that those French military vessels could not land in German hands.
Here below is a brief of what Churchill's demand to the French Navy at sea (or that was able to set to sea before German troops arrived and prevented them from doing so) stated.
It is impossible for us, your comrades up to now, to allow your fine ships to fall into the power of the German enemy. We are determined to fight on until the end, and if we win, as we think we shall, we shall never forget that France was our Ally, that our interests are the same as hers, and that our common enemy is Germany. Should we conquer we solemnly declare that we shall restore the greatness and territory of France. For this purpose we must make sure that the best ships of the French Navy are not used against us by the common foe. In these circumstances, His Majesty's Government have instructed me to demand that the French Fleet now at Mers el Kebir and Oran shall act in accordance with one of the following alternatives;
(a) Sail with us and continue the fight until victory against the Germans.
(b) Sail with reduced crews under our control to a British port. The reduced crews would be repatriated at the earliest moment.
If either of these courses is adopted by you we will restore your ships to France at the conclusion of the war or pay full compensation if they are damaged meanwhile.
(c) Alternatively if you feel bound to stipulate that your ships should not be used against the Germans lest they break the Armistice, then sail them with us with reduced crews to some French port in the West Indies — Martinique for instance – where they can be demilitarised to our satisfaction, or perhaps be entrusted to the United States and remain safe until the end of the war, the crews being repatriated.
If you refuse these fair offers, I must with profound regret, require you to sink your ships within 6 hours.
Finally, failing the above, I have the orders from His Majesty's Government to use whatever force may be necessary to prevent your ships from falling into German hands.
Indeed, several French military vessels were sunk by the Brits to prevent them from falling into German hands (and prevent them later being potentially used in anger against the Brits and her allies by the Germans). This was because the French naval commanders were reticent to accept the terms that were effectively like a "surrender" in their eyes. On July 3rd of 1940 for example, British ships ended up attacking multiple French naval vessels who refused the terms Churchill had outlined. These ships included the battleships "Dunkerque ", "Provence ", and "Bretagne" (as well as some other destroyers, and some other ships that were damaged though managed to escape the British naval fleet attack), with the loss of the battleship "Bretagne" being particularly brutal, as it was sunk by the Brits and saw the loss of 927 French sailors who were aboard. The same ultimatum from Churchill was issued to the remaining French naval fleet in North Africa (at ports like Dakar), and that also resulted in the British having to eventually attack and severely damage or sink numerous of those French-flagged naval vessels in that region in order to ensure the Germans could not get their mitts on that French naval hardware.
The Axis German military definitely wanted and tried to get hold of as many French naval vessels as possible so as to hopefully reflag them and use them as German naval vessels against Germany's own Allied enemies, but (and admittedly, I am leaving some stuff out here in the interests of brevity), the French finally appreciated - mostly after "Operation TORCH", which was the combined British-American invasion of the French North Africa area in the latter part of 1942 - that the Germans were after their French naval hardware and wanted it for themselves, and the surviving French command (The "Free French") realized they could not allow this to happen, as it would just serve to aid Germany's war efforts. This resulted in the French actually "scuttling" (deliberately sinking) many of their own ships in North Africa and at their base in Toulon, France to ensure they would not fall into German hands.
So, to put it bluntly, the Brits and Americans worked hard to prevent French vessels from falling into German hands after the fall of France - even purposefully sinking French naval vessels if need be - and the "Free French" even destroyed many of their own ships and subs in their naval inventory via scuttling in order to ensure that Germany would not get hold of them.
Germany tried to get hold of as much of the French Navy as they could, with Hitler even sending in the powerful 7th Panzer Division to attack and try to secure the ports at Toulon in an effort to seize the French naval vessels there, but the vast majority of those ships were scuttled by the French to keep them away from being taken and used in anger by the Krauts.