These are different levels of idealization. A truly ideal voltage source would have zero resistance, but such an object can't really exist because it would produce infinite current for a given potential difference. So we often consider a voltage source to have some internal resistance (but we still often apply the term ``ideal voltage source'' to the thing with the resistance).
Sometimes, though, we neglect the internal resistance of a voltage source, for convenience, since the resistance might be small enough not to matter much in our treatment of the system. It all depends on what level of precision you need to describe the system reasonably.