Mostly your needle won't care if it's a "rag" quilt or not, but the layers to achieve this will matter. Normally we match needle to thread size. Flannel does have some specific requirements, especially since layers of flannel end up being somewhat thick. I'd choose a needle in the 12-14 size range for 40 or 50 wt. thread, but ultimately needs to be a topstitch needle. They are sharper, more slender points for penetration, but more importantly they have an elonglated eye to assist in the thread looping in thicker wads of fabric.