Is every submodule of a free module of finite rank over a PID a direct summand? Suppose $F$ is a free module of rank $n$ over a PID, with $N$ a submodule. Is $N$ always a direct summand of $F$? 
I think the answer is yes, $N$ is also free of rank $m\leq n$ since we are working over a PID, and then $N\simeq R^m$, thus $F/N\simeq R^{n-m}$ which is a free $R$-module, so $N$ is a direct summand of $F$. 
I'm just a little unsure since I can't find a reference for this online, and it seems like it should be a commonly documented fact if it is indeed true.
 A: No. Let $R$ be a principal ideal domain that is not a field, and let $p\in R$ be a prime element. Then the ideal $I=pR$ cannot be a summand of $R$. Indeed, if there were an $R$-module isomorphism $R\cong I\oplus M$ for some $R$-module $M$, then we would have an injection $R/I\cong M\hookrightarrow R$, which is impossible as the source is a non-zero torsion $R$-module. 
Your error is in concluding that the quotient of two free modules is free. This is not so, as the above example shows.
A: 
Suppose $F$ is a free module of rank $n$ over a PID, with $N$ a
  submodule. Is $N$ always a direct summand of $F$?

Yes this is true. First,  $N$ is a free module, as it is a submodule of a free module over a PID. Now let $\{x_1, x_2, \ldots, x_n\}$ be a basis for $F$, and let $\{y_1, y_2, \ldots, y_k\}$ be a basis $N$. Since we are working over a PID, we know $k \le n$. Then we can define an $R$-linear map $\phi:F\rightarrow N$ where 
$$\phi(x_i) = y_i$$ for $1 \le i \le k$, and 
$$\phi(x_j) = 0$$ 
for all $k \le j \le n$. Then $\phi$ is surjective. Then consider the short exact sequence
$$0 \rightarrow \ker(\phi) \xrightarrow{\iota} F \xrightarrow{\phi} N \rightarrow 0,$$
where $\iota:\ker(\phi)\rightarrow F$ is the inclusion map. Then since $N$ is free and hence projective, the above exact sequence splits. Then
$$F \cong \ker(\phi)\oplus N,$$
hence $N$ appears as a direct summand.
