i'll try to explain this briefly.
firstly all the modes can be constructed by taking the ionian mode (the basic majour one), by taking a different starting note.
secondly if you take the first 3rd 5th notes of the ionioon mode you get the first chord in ionion.
if you take the second 4th and 6th notes in the ionioin mode you get the second chord in the ionion scale.
if you take the third 5th and seventh note in the ionion mode you get the third chord of the scale
if you take the fourth 6th 8th/1st note of the ionion mode you get the 6th chord of the ionion scale
etc etc
so all the notes in the chords must be in the scale you are using, unless you are playing jazz or blues or there is a key change.
so if you want a fool proof method look for all the notes in the chords and find if they fit into the ionion scale at some point on the neck. then listen to the rythm part and try to see if you can work out what the root chord is. try to do this by ear, it will normally be the starting or ending chord of a bar, itis the chord that sounds settled on. by knowing this you will be able to see what mode you should be using.