Question: Given a diatonic chord in a scale, what are the rules to find out which tensions among 9, 11#, 13, I can use?

Answer: 
By counting up the Major scale, you'll find the 9th, 11th, and 13th notes that make up the 9th, 11th, and 13th chords. If you look at a Major 13th chord you can see that it also contains the 7th, 9th, and 11th notes in the chord. This is the way that any diatonic extension is made on a chord in "theory". However, in practice, it is not necessary to include all of these notes. The important note is the 7th. If you have C-E-G-B-A, you have enough notes to imply a C Major 13 chord. If you take away the 7th, you end up with C-E-G-A, a C6 chord. You can extend Major, minor, and Dominant Chords. Chromatic alterations occur most frequently in chords having a flatted 7th note - chords in the Dominant family.
And don't forget the 7th!

Well, you probably don't want to clash too closely with the melody. And you should consider the harmonic density - a b9#11 chord can sound a bit odd when surrounded with plain triads.

Above all, try not to see chords as seperate entities, but as a combination of melodic lines.