Are there noncongruence subgroups (of finite index) of the modular group generated only by 2 or 3 elements? By the modular group I mean either $SL(2,\mathbb{Z})$ or $PSL(2,\mathbb{Z})$.
Where can I find examples of these?
Another question: is there a good (ideally analytical, but possibly computer-aided) way to determine if a subgroup of the modular group generated by some given matrices has finite index, and possibly allowing to compute the index?
 A: *

*For your first question: "Most" 2-generated subgroups of the modular group will have infinite covolume, so they are not congruence subgroups. For instance, take the subgroup generated the upper and lower triangular matrices with off-diagonal entries equal to $2$.


*For your second question: There is Jorgensen's algorithm for constructing fundamental domain for a subgroup of $PSL(2,\mathbb Z)$ with the given set of generators, see my answer in (un)decidability in matrix groups
After you construct such fundamental polygon you can check if it has any edges contained in the circle at infinity of $\mathbb H^2$. This is equivalent to having infinite index. Analytically, finite index is equivalent to finiteness of covolume.
A: A. J. Scholl has written a series of articles on modular forms on noncongruence subgroups. In the article 
On the Hecke algebra of a noncongruence subgroup, Bull. London Math. Soc. 29 (1997), no. 4, 395–399
he gives two examples of index 7 subgroups of $\mathrm{SL}_2(\mathbf{Z})$ generated by 3 elements :
$$\Gamma_{4,3} = \Bigl\langle \begin{pmatrix} 1 & 4 \\ 0 & 1 \end{pmatrix},\begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix},\begin{pmatrix} 1 & -1 \\ 2 & -1 \end{pmatrix} \Bigr\rangle$$ 
$$\Gamma_{5,2} = \Bigl\langle \begin{pmatrix} 1 & 5 \\ 0 & 1 \end{pmatrix},\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix},\begin{pmatrix} 2 & 3 \\ 1 & 2 \end{pmatrix} \Bigr\rangle$$ 
The subscripts refer to the widths of the cusps (both groups have exactly two cusps).
A: I've compiled my serial comments on Misha's answer with this new answer, not containing any information unavailable in the other answers, but working out Wohlfart's example mentioned by Agol in more explicit detail. In particular there is more than one distinct conjugacy class (up to orientation reversal) of index 7 subgroups isomorphic to $\mathbb{Z} * \mathbb{Z}/3 * \mathbb{Z}/2$ and with two cusps; I have found three such. Extra information Wohlfart gives regarding amplitude of the cusps pins down which one it is.
The modular orbifold, of genus zero with one cusp, one $\mathbb{Z}/3$ cone point, and one $\mathbb{Z}/2$ cone point, deformation retracts to a graph of groups $G$ consisting of the unique geodesic connecting those two cone points. Covering spaces of the modular orbifold up to covering isomorphism (in the category of orbifolds), correspond to coverings of $G$ up to covering isomorphism (in the category of graphs of groups), the covering graph sitting as a deformation retraction of the covering orbifold. Each finite degree covering graph of $G$ is a finite, connected, bipartite graph of groups, where each vertex in one set is either of valence 2 labelled with the trivial group or of valence 1 labelled with $\mathbb{Z}/2$, and each vertex in the other set is either of valence 3 labelled with the trivial group or of valence 1 labelled with $\mathbb{Z}/3$; all edges are labelled with the trivial group. Its fundamental group is a free product of: $e_\infty$ copies of $\mathbb{Z}$, $e_3$ copies of $\mathbb{Z}/3$, and $e_2$ copies of $\mathbb{Z}/2$. The minimal number of generators equals $e_\infty + e_3 + e_2$, and $e_\infty = 2 \cdot $(genus)$ + $(number of cusps)$ - 1$. Also, Wolhfart gives a formula for index taken from a paper of Peterrson (which Agol alludes to in his answer), and which amounts to
$$index = 6 \cdot e_\infty + 4 e_3 + 3 e_2 - 6
$$
Wolhfart's noncongruence example has index 7 with two cusps, one of amplitude 1 and one of amplitude 6. The amplitude is equal to half the number of edges of the edge path in the graph that is obtained from a circle around the cusp by projecting that circle to the graph under the deformation retraction. If one adds the restriction that this is the 3 generator example, one gets $e_\infty = e_2 = e_3 = 1$, and the corresponding hyperbolic orbifold is a twice punctured disc (an open annulus) with one $\mathbb{Z}/2$ cone point and one $\mathbb{Z}/3$ one point. If one requires the cusp at the origin to have amplitude 1 and the cusp at infinity to have amplitude 6, this is enough to pin down the graph in $\mathbb{C}-0$ uniquely (up to isotopy and orientation reversal).
First draw a circle around the origin, subdivided at two vertices into two edges. One of those vertices will have valence 2 in the graph, the other will have valence 3. Attach to the latter vertex an arc of two edges on the outside of the circle; the interior vertex of that arc will have valence 2, and its opposite vertex will have valence 3. Attach to that opposite vertex two arcs: one arc has one edge and opposite vertex of valence 1 labelled $\mathbb{Z}/2$; the other has two edges, interior vertex of valence 2, and opposite vertex of valence 2 labelled $\mathbb{Z}/3$. 
A: The answer to your Question 1. is that there are not rank 2 subgroups of $PSL_2(\mathbb{Z})$, but there are rank 3 subgroups. This follows from a result of Wohlfahrt. He shows in Theorem 5
that any non-congruence subgroup $\Gamma < PSL_2(\mathbb{Z})$ has index $\geq 7$. 
Misha points out in a comment to his answer that a finite coarea fuchsian group of rank $N$ has $Area(\mathbb{H}^2/\Gamma)\leq 2\pi(N-1)$. Therefore in the case $\Gamma$ is non-congruence, $Area(\mathbb{H}^2/\Gamma)=[PSL_2(\mathbb{Z}):\Gamma] Area(\mathbb{H}^2/PSL_2(\mathbb{Z})) \geq 7\pi/3$. Thus, $N=rank(\Gamma) \geq 3$. Misha's claim (in the non-uniform case) follows from an application of the free product decomposition of non-uniform Fuchsian group into cyclic groups, Grushko's theorem, and Gauss-Bonnet. 
Wohlfahrt also gives an example of a non-congruence subgroup of index $7$ in $PSL_2(\mathbb{Z})$. On p. 531, he points out that there exists an index $7$
subgroup with two cusps. One determines that the group has genus $0$,
and two cone points of orders $2$ and $3$ respectively. This group is therefore
rank $3$, isomorphic to $\mathbb{Z}\ast \mathbb{Z}/2\ast\mathbb{Z}/3$. I 
didn't check, but I think this also lifts to a rank 3 subgroup of $SL_2(\mathbb{Z})$.
