The bard's spellcasting class features (PHB, pg. 53) includes the following:
Spellcasting Focus
You can use a musical instrument (found in chapter 5) as a spellcasting focus for your bard spells.
In chapter 5, it says this about musical instruments (PHB, pg. 154):
Musical Instrument. Several of the most common types of musical instruments are shown on the table as examples. If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus. Each type of musical instrument requires a separate proficiency.
Typically, a bard will have at least one musical instrument proficiency (3 from start, 4 if they get another via background, or as few as 1 if they multiclass into bard from something else).
However, at the end of the chapter 5 quote, it says "Each type of musical instrument requires a separate proficiency", meaning that a bard could lose their musical instrument but find or buy one that they aren't proficient in.
The chapter 5 quote also says "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument", but that's about playing it, not necessarily using it for spellcasting (and there doesn't at time of writing seem to be a definitive answer on whether you need to play it to cast spells with it; that's not the purpose of my question, anyway).
Finally, the chapter 5 quote also says "A bard can use a musical instrument as a spellcasting focus", but it says it in a separate sentence to the one about proficiency, so the two sentences don't necessarily relate to one another.
If a bard only has a musical instrument that they aren't specifically proficient in, can they still use it to cast spells?