Nucleophilic substitution in polar protic/aprotic solvents
It depends whether the reaction progresses through SN1 or SN2. In both, the departing of a leaving group is involved in the rate determining step, but only in SN2 is the nucleophile included in the rate determining step. In the following mechanisms, both of the first steps are rate determining.
(Image from https://www.quora.com/Why-steric-hindrance-doesnt-affect-Sn1-reaction)

It is important to remember that a good leaving group is defined by poor basicity, which can be quantified by a low pKa of the conjugate acid of the leaving group. Intuitively, this means the conjugate acid can lose a proton and the resulting base - our leaving group - will be reluctant to re-react with the proton. Or in our case, re-react with the electrophilic carbon. This generally means that good leaving groups are large, low charge density species; good examples are neutral molecules or even charged species like iodide ions.
This idea of strong and weak nucleophiles is situational. Hard-soft acid-base theory becomes a very useful reference in a lot of situations. It generally states that low charge density 'soft' nucleophiles and electrophiles have an affinity for eachother, and high charge density 'hard' nucleophiles also have an affinity for eachother. You can read more about exactly why this happens here:
https://en.wikipedia.org/wiki/HSAB_theory
Generally, we consider a saturated carbon a 'soft' electrophile, which will react very well with low charge density nucleophiles like iodide ions. What this means, is that in SN2 reactions, species that are considered good leaving groups are also good nucleophiles. For instance, you may predict - correctly so - that iodide ions are good leaving groups as well as good nucleophiles for SN2; this is why KI can be used to catalyse SN2 reactions by acting as both (usually better than your actual nucleophile and leaving group)!
(Image from Clayden Organic Chemistry)

These reactions can end up reasonably reversible, and can be driven to one side by modifying conditions. For instance, the reaction below (from Clayden organic chemistry) exploits the insolubility of a byproduct, effectively removing it from the equilibrium, shifting it to the right:
(Image from Clayden Organic Chemistry)

In SN1, nucleophilicity is irrelevant, since the nucleophile doesn't appear in the rate determining step, but I'd imagine the equilibrium position can be roughly estimated by relative leaving group abilities.
In answer to your specific example, fluoride would actually be a poorer SN2 nucleophile than you might think, worse than the bromide leaving group would be. The polar protic solvent will even further inhibit the nucleophilicity of the fluoride due to hydrogen bonding, slowing it down dramatically (so your assumption is accurate for kinetic reasons); and once it has been substituted, the fluoride ion is not a particularly good leaving group. In DMF, you don't have the hydrogen bonding issue, and due to poor solvation of anionic species in DMF, the fluoride is made slightly more reactive than it would be 'on its own'. And leaving group ability is also reduced due to poor solvation. This seems like it would be clear-cut; the fluorine will replace the bromine, right? However the bromide ion is a good nucleophile in this situation, and has the potential to kick off the fluoride in either solvent.
As you can see, there are a lot of factors to juggle here, and the actual degree to which the reaction progresses is specific to the exact conditions of the reaction. At a first glance, it is very difficult to predict, and is not necessarily as simple as the 'better' nucleophile replacing the 'worse'.