Yes.. So I've heard. For reference:
Good news! https://trextrying.tumblr.com (Marked as adult content because... that T-Rex isn't wearing any pants?) And there's a book!
What starts with an "F" and ends with "ag" that's bad for your lungs when you light up at one end and put your mouth on the other? The answer is fag
The third nation in space were Czechs in 1978 and Vladimír Remek was called cosmonaut then. But now, Czech Republic is part of NATO. So it’s not that easy.
As appealing as the urban legend about a recycled fruit crate with the first letter of its old label smudged off is, the resemblance is pretty much a coincidence.
Like Lumiep mentioned, 'ananas' is derived from the Guarani ananá, and spread via French into a lot of other languages. The word 'banana', on the other hand, seems to have originated in the Wolof language of West Africa and been borrowed- first into Portuguese- sometime in the 1500s. I don't know where the Wolof word came from, but it must have been a fairly recent coinage at the time, since bananas are native to southeast Asia and had only reached sub-Saharan Africa via Muslim traders a few centuries before- and since the Arabic word for the plant is mawz, the Wolof word probably didn't come from them.
That said, it's fairly common for words that already have some similarity in form and meaning to drift closer to each other in a process called analogical change- the word 'sorry', for instance, is etymologically related to 'sore', but the first vowel was apparently altered by analogy with the unrelated 'sorrow'. I can't say where or when it would have happened or what precisely it would have entailed, but I wouldn't be surprised if something like that had happened here: as different as they are from a culinary standpoint, both fruits grow on herbaceous, vaguely palm-like plants with sword-shaped leaves, both- depending on cultivar- have yellowish flesh, and, since the Portuguese introduced the banana to southern Brazil in the late 1500s, (which I'd imagine was also the time and place where the word the word 'ananás' entered their language), both were being cultivated in the same area during the period when speakers of European languages would have initially become acquainted with them.