Are there languages where a vowel and a consonant can be allophones of the same phoneme?
I think this question may be trickier to answer than you realize--it largely depends on your definition of vowel and consonant.
If you take a structural phonological approach to defining those terms (i.e., if whether something is a vowel or a consonant depends on where it occurs in the syllable), then they are by definition in complementary distribution, so there's no way to prove that any vowel and any consonant aren't allophones of the same phoneme. We may say that [j] and [l] must be realizations of different phonemes, because we have minimal pairs like yes/less. Similarly, [oʊ] and [i] must be realizations of different phonemes because we have minimal pairs like boat/beat. But there can't be a minimal pair that contrasts in the inclusion of a vowel vs. the inclusion of a consonant in the same syllabic slot. Pairs like yon/eon and fro/furrow don't count, because in such cases both the segmental makeup and the syllabic structure is varying. (Note that the same is true for the French example in @cyco130's answer.) In such a model, one might look to distinctive features as a guide for identifying consonant vowel pairs that might be considered allophonic pairs. In particular, one might consider approximant/vowel pairs in French, English, etc. (of the type that @cyco130 describes) to be allophone pairs by virtue of the fact that their "features" (other than +/-syllabic) are the same. Of course this kind of criterion is entirely dependent on the feature set you use!
If you have other criteria for vowel vs. consonant, like 'vowels must be voiced' and 'all fricatives are consonants' (regardless of whether they are syllabic or not), then it may be possible to find some other types of cases that would qualify. For example, it is well-known that in continuous speech in Japanese high vowels often get devoiced after voiceless consonants. It is even common for the vowel to "disappear" altogether and be replaced by a lengthened version of the consonant before it, effectively being realized as a fricative*.
Depending on how you analyze such cases, you could argue that these surface fricatives in Japanese are allophones of the underlying high vowels.
Note that there is actually an articulatory and acoustic difference between the voiceless vowel [i̥] and the voiceless fricative [ç]. What is often described as the former is more accurately described as the latter. In the case of [i̥], the main constriction (and therefore the source of turbulent noise) is in the glottis; in [ç] it's between the tongue and the hard palate. I would argue that some realizations of /h/ in English are not voiceless vowels (as @jlawler claimed) but rather fricatives. Try pronouncing the beginning of the word huge and compare that sound to a whispered /i/ vowel. They are probably produced differently and sound different. But the /h/ in hot is pretty much realized the same as a whispered /a/ vowel. So one could make the argument that some allophones of /h/ are voiceless vowels and others (namely those before /i/ and /j/) are voiceless fricatives!
Of the top of my head, French comes close. According to Wikipedia "the approximants [j], [ɥ] and [w] correspond to /i/, /y/ and /u/ respectively. While there are a few minimal pairs (such as loua [lu.a] 's/he rented' and loi [lwa] 'law'), there are many cases where there is free variation".
I'd guess approximant/vowel allophones not to be uncommon cross-linguistically.
I suggest we leave proto-Indo-European out of this. You cannot really use hypothetical reconstructed languages to illustrate points of phonology and phonetics.
In Latin qui and cui are a minimal pair; the former was presumably /kwi/, the latter /kui/ or possibly /kuj/. My recollection is that the poets scan the latter both as two syllables and as one.
French loua /lua/ and loi /lwa/ are indeed a minimal pair, but only in lento speech. At normal speed they are both realised as [lwa].
jlawler’s remark about English /r/ is interesting. But I am not sure whether it is meaningful to analyse Southern British English “fear” phonologically as /fi:r/ rather than as /fiə/; in the latter case "r" would be purely orthographic/historic for the phoneme /ə/.
In Standard German, the R behaves like this.
Prevocalic /r/ is pronounced [ʁ] or [ʀ], but postvocalic /r/ is pronounced [ɐ]. This is not merely an orthographic convention: Adding a suffix can produce a new syllable and turn [ɐ] into [ʁ].
"Rad" (wheel): [ʁat]
"Bär" (bear): [beɐ]
"Bären" (bears): [be.ʁən]
"Bauer" (farmer): [baʊɐ]
"Bäuerin" (female farmer): [bɔʊə.ʁɪn]
Disclaimer: I'm not a linguist, so the transcription may not be 100% accurate.
Think of the word 'little' in Southern English (for example the speech of Londoners). Both l's are regarded by speakers as the same phoneme however the first is a consonant and the second is a back vowel. Compare that with Northern English or American English where both are consonants albeit, at least in Northern English, the second is syllabic.