With a series connection, the same amount of current flows through all devices.
You'll want to look closely at this circuit and ask yourself "what will keep these 3 LEDs from flowing more than their rating of 20ma?
The number on the data-sheet won't do it. That only admonishes you not to design a circuit which would allow them to draw more than 20ma.
If you're thinking "well it says 20ma draw therefore it must surely self-regulate to 20ma", nope. Components don't work that way. Consumer appliances do; a light fixture that claims 120ma draw on AC power will, because it's engineered as a system (and approved and listed by UL) to do so. The constant-voltage AC power system forces appliances to work in a linear way (self regulate their draw).
Components do whatever is their nature to do. LEDs are highly non-linear and a small change in voltage will result in a high change in current.
So if you engineer for worst case, a 9v battery outputting 9.7V and the LEDs dropping you say 3V each, that's 0.7V to drop in the resistor, and you wnt 20ma flow.
E=IR is Ohm's Law.
0.7 = 0.02 x R
50 x 0.07 = R
35 = R
35 ohms is a place to start. You'll want to test it real-world to see what it actually does.