There's a difference between the executable search path and library search path in Linux.
The executable search path (the PATH environment variable) determines where the system will look for applications such as df, fdisk, fpc etc, if you don't specify the full path to the application.
The library path is the path where the system looks for shared libraries (mostly/always .so files, the equivalent of Windows .dll files).
This is configured in /etc/ld.so.config (and e.g. the files under /etc/ld.so.config.d).
On my Debian machine:
cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib
So you could add a new file /etc/ld.so.conf.d/firebird.conf
with e.g.
# xinyiman: added Firebird libraries so we can use them
# of course, edit according to location of firebird .so files on your system
/opt/firebird/lib