A filter or coloured glass, whatever, cannot add any wavelengths that were not present as emitted by the original source. So if the bulb produces a colour that is safe, no filter can make it unsafe.

If you have a red bulb that you determine to be safe (via a proper safelight test), you can put any colour around it you want, although note if the bulb is red and the glass is a complementary colour, not much light will come through at all.

If you have a white bulb, then indeed the glass enclosure must be the correct colour to absorb (filter) the unsafe wavelengths. So you could only use the correct red or amber glass to make it safe for enlarging papers. Again, you'd have to do a proper safelight test.