Yes, of course! Just add the Firebase SDK to your code, configure it and off you go!
After all, Firebase is just a service somewhere else with a HTTP API. We don’t prevent your site from communicating with other services (except for a few social APIs that were being abused a lot), including Firebase.