Preservation of direct sums and finite generation This is a follow up on Evariste's question Hom and direct sums. 
Let $R$ be an associative ring with one. The word "module" shall mean left $R$-module. Say that a module $A$ preserves direct sums if the functor $\hom_R(A,?)$ does.  
The main question is

Does the condition that $A$ preserves direct sums imply that $A$ is finitely generated? 

The converse is clear: see this answer. 
As observed by Mariano Suárez-Alvarez in a comment to this answer, if $A$ can be written as the union of an increasing sequence $(A_n)_{n\in\mathbb N}$ of submodules, then $A$ does not preserve direct sums. [The argument is described in the answer.]
Say that $A$ is countably cofinal if it can be written as such a union. If $A$ is neither finitely generated nor countably cofinal, say that $A$ is uncountably cofinal. 
[Here is the motivation for this terminology. A group which can be written as the union of an increasing sequence of subgroups is called countably cofinal, and a group which is neither finitely generated nor countably cofinal, is called uncountably cofinal. Uncountably cofinal groups have been studied by Serre, Tits, MacPherson, Bergman, and many others: see this Google Search. In particular, uncountably cofinal groups do exist.] 
The second question is: 

Do uncountably cofinal modules exist? 

In a very partial answer, I'll try to prove that no such modules exist if $R$ is a Dedekind domain. 
 A: New Answer
Preliminaries
See also this MathOverflow question. The following references will be used:


*

*[Ba] Hyman Bass, Algebraic K-Theory, 1968. 

*[Bo] Nicolas Bourbaki, Algèbre commutative. 

*[R] Rudolf Rentschler, Sur les modules M tels que $\text{Hom}(M,-)$ commute avec les sommes directes, C. R. Acad. Sci. Paris Sér. A-B 268 (1969), 930-933. 
Rentschler's paper is available here in one click, and there in a few clicks. [I'm also giving the second option because it's a trick worth knowing.] Thanks to Stéphanie Jourdan for having found this link! 
Since I'm using references written in French while writing in English (or at least trying to), I stick strictly to linguistic conventions. In particular: 


*

*ordered set = ensemble totalement ordonné, 

*poset = ensemble ordonné, 

*increasing = strictement croisssant, etc. 
Answer
Let $R$ be an associative ring with $1$, and let $A$ be an $R$-module. The following exercises in [Ba] p. 54 answer the question: 
(a) Show that $A$ is finitely generated if and only if the union of an ordered family of proper submodules of $A$ is a proper submodule.
(b) Show that $\text{Hom}_R(A,\bullet)$ preserves coproducts if and only if the union of every nondecreasing sequence of proper submodules is a proper submodule.
(c) Show that the conditions in (a) and (b) are not equivalent. 
Solutions
(a) If $A$ is finitely generated, then the union of a totally ordered set of proper submodules is clearly a proper submodule. Let's prove the converse: 
Assume that $A$ is not finitely generated. Let $Z$ be the set of those submodules $B$ of $A$ such that $A/B$ is is not finitely generated. The poset $Z$ is nonempty and has no maximal element. By Zorn's Lemma, there is a nonempty totally ordered subset $T$ of $Z$ which has no upper bound. Letting $U$ be the union of $T$, we see that $A/U$ is finitely generated. There is thus a finitely generated submodule $F$ of $A$ which generates $A$ modulo $U$. Then the $B+F$, where $B$ runs over $T$, form a totally ordered set of proper submodules whose union is $A$. 
(b) Let "map" mean "$R$-linear map". 
If $A_0\subset A_1\subset\cdots$ is a sequence of proper submodules of $A$ whose union is $A$, then the natural map from $A$ to the direct product of the $A/A_n$ induces a map from $A$ to the direct sum of the $A/A_n$ whose components are all nonzero. 
Conversely, let $f$ be a map from $A$ to a direct sum $\oplus_{i\in I}B_i$ of $R$-modules such that the set $S$ of those $i$ in $I$ satisfying $f_i\neq0$ [obvious notation] is is infinite. By choosing a countable subset of $S$ we get a map $g$ from $A$ to a direct sum $\oplus_{n\in \mathbb N}C_n$ of $R$-modules  such that $g_n\neq0$ for all $n$. It is easy to check that the 
$$
A_n:=\bigcap_{k > n}\ \ker(g_k), 
$$ 
form an increasing sequence of proper submodules of $A$ whose union is $A$.
(c) The following result is implicit in Rentschler's paper [R], and solves the exercise: 
Theorem. Let $T$ be a nonempty ordered set with no maximum. Then there is a domain $A$ which has the following property. If $P$ denotes the poset of proper sub-$A$-modules of the field of fractions of $A$, then there is an increasing map $f:T\to P$ such that $f(T)$ is cofinal in $P$. 
Proof. Let $T_0$ be the ordered set opposite to $T$, let $\mathbb Z^{(T_0)}$ be the free $\mathbb Z$-module over $T_0$ equipped with the lexicographic order. Then $\mathbb Z^{(T_0)}$ is an abelian ordered group (groupe abélien totalement ordonné). By Example 6 in Section V.3.4 of [Bo], there is a field $K$ and a surjective valuation 
$$
v:K\to\mathbb Z^{(T_0)}\cup\{ \infty \}.
$$ 
Say that a subset $F$ of $\mathbb Z^{(T_0)}$ is a final segment if 
$$F\ni x < y\in\mathbb Z^{(T_0)}
$$ 
implies $y\in F$. Attach to each such $F$ the subset 
$$
S(F):=v^{-1}(F)\cup \{ 0 \}
$$ 
of $K$. Then $A:=S(F_0)$, where $F_0$ is the set of nonnegative elements of $\mathbb Z^{(T_0)}$, is a subring of $K$. Moreover, by Proposition 7 in Section V.3.5 of [Bo], $F\mapsto S(F)$ is an increasing bijection from the final segments of $\mathbb Z^{(T_0)}$ to the sub-$A$-modules of $K$. 
Write $e_{t_0}$ for the basis element of $\mathbb Z^{(T_0)}$ corresponding to $t_0\in T_0$. Then the intervals 
$$
I_{t_0}:=[-e_{t_0},\infty)
$$ 
are cofinal in the set of all proper final segments of $\mathbb Z^{(T_0)}$, and we have $I_{t_0}\subset I_{u_0}$ if and only if $t\le u$. [We denote an element $t$ of $T$ by $t_0$ when we view it as an element of $T_0$.] 

Old Answers
Second Old Answer
Unsurprisingly, this question has been intensively studied. The most common adjective to designate rings for which only the finitely generated modules $A$ have the property that the functor $\hom(A,?)$ preserves direct sums seems to be left steady. The existence of rings which are not left steady has been known for a long time. See these two articles and the references they contain: 


*

*Simion Breaz, Modules $M$ such that $\text{Ext}_R^1(M,-)$ commutes with direct sums--the hereditary case, 2011, ArXiv.  

*Jan Zemlicka, Classes of dually slender modules, Proc. Algebra Symposium Cluj 2005, 129 - 137, pdf file. 
See also this MathOverflow question. 
First Old Answer
This is a very partial answer. 
Let $R$ be a Dedekind domain, and $A$ a module which is not finitely generated. [Here and in the sequel, "module" means "$R$-module".] 
We claim that $A$ is countably cofinal, i. e., that $A$ is the union of an increasing sequence $(A_n)_{n\in\mathbb N}$ of submodules. 

Case 1: $A$ is torsion. 

For each maximal ideal $\mathfrak m$ of $R$ and each nonnegative integer $n$, let $A^{\mathfrak m}_n$ be the set of those elements of $A$ which are killed by $\mathfrak m^n$, and let $A^{\mathfrak m}$ be the union of the $A^{\mathfrak m}_n$, where $n$ runs over $\mathbb N$. 
Then $A^{\mathfrak m}_n$ and $A^{\mathfrak m}_n$ are submodules, and $R$ being Dedekind, $A$ is the direct sum of the $A^{\mathfrak m}$. Moreover, each $A^{\mathfrak m}_n/A^{\mathfrak m}_{n-1}$ is a vector space over the field $R/{\mathfrak m}$. 
If infinitely many $A^{\mathfrak m}$ are nonzero, the claim is clear. Otherwise we may assume that $A$ is equal to $A^{\mathfrak m}$ for some $\mathfrak m$. If the $A^{\mathfrak m}_n$ form an increasing sequence, we're done. 
So, assume the sequence $(A^{\mathfrak m}_n)$ is stationary. In particular there is a largest $n$ such that $A^{\mathfrak m}_n/A^{\mathfrak m}_{n-1}$ is infinite dimensional. By replacing $A$ with $A/A^{\mathfrak m}_{n-1}$ we can assume $n=1$. Let $B$ be a finitely generated submodule of $A$ which generates $A$ modulo $A^{\mathfrak m}_1$. Then $A/B$, being an infinite dimensional $R/{\mathfrak m}$-vector space, is countably cofinite. 

Case 2: $A$ is torsion free. 

Embed $A$ into an injective hull $H$, which is a vector space over the field of fractions $K$ of $R$. Let $E$ be a $K$-basis of $H$. As $H$ is an essential extension of $A$, we can assume that $E$ is contained in $A$. Let $R^{(E)}$ be the submodule of $A$ generated by $E$. Then $A/R^{(E)}$ is torsion. 
If $A/R^{(E)}$ is not finitely generated, we're done by Case 1. So assume that $A/R^{(E)}$ is finitely generated. 
In particular $E$ is infinite. Moreover, there is a finitely generated submodule $B$ of $A$ which generates $A$ modulo $R^{(E)}$, and a finite subset $F$ of $E$ such that $K^F$ contains $B$. We can assume that $B$ contains $F$. Then $A/B$, being isomorphic to $R^{(E\setminus F)}$, is countably cofinite. 

Case 3: general case. 

Let $T$ be the torsion submodule of $A$. Having proved the claim in the torsion free case, we can assume that $A/T$ is finitely generated. 
Then there is a finitely generated submodule $B$ of $A$ which generates $A$ modulo $T$, and $A/B$, being a non-finitely generated torsion module, is countably cofinite by Case 1. 
