This grammar point is very formal, literary, or archaic and shows up in such texts or those mimicking their style.
The old-style direct quote introduction meaning is only really used in archaic contexts like the Bible or old records.
Regardless of whether the verb ends with a consonant or a vowel, the form -되 is used. However, after 있다, 없다, -V+았/었/였-, or -V+겠-, the form -으되 is used. In nonstandard writing though, some people may use -되 after those as well.
In archaic speech, after N+이다 or 아니다, the form -로되 may be used.
The first meaning is similar to V+지만, V+(은/ㄴ/는)데, or -는 이상.
The second meaning is similar to -기를 or -길.