There is no "proper" guideline for setting a scale to play over a chord.
There are some standard practices in thinking about the scale-chord relationships in various styles of solo playing, so the approach will be genre dependent.
A particular scale does not even need to be chosen to select notes to play over a chord. Using a scale is one way of simplifying the player's note choice in a solo.
When playing over a chord there will be notes that are "consonant" and "dissonant" to the chord tones, to various degrees. The most consonant notes will be the chord tones themselves. Non-chord notes that are in the same diatonic pattern as the chord notes will be the less dissonant notes. The "chromatic" notes will tend towards more dissonance.
Chords can suggest a scale to use, again depending on style. For example, if the chord progression is based on a diatonic I IV V progression ( C, F, G, in the key of C major), then the major scale can be used over any of the key's chords.
If a chord is extended, a different scale may be implied by the chord tones. For example, if the piece has a Dominant 7 chord, a scale may be built out of the four chord tones, with the implication that the scale will contain the intervals of the chord tonic, a major 3rd, a perfect 5th, and a minor 7th. Mixolydian (Major flat7) scale is an easy fit and is often suggested in jazz primers.
More complex chord spellings set a list of your primary consonant tones, and scale choice becomes a matter of experience and desired style.