How do I update sqlite version my code built against?

I don’t have a deep understanding on how embedding sqlite in rust works. I use sqlite package and I have an upsert statement insert into ... on conflict (field)... and this works just fine on my Mac and arch linux but on ubuntu it gives syntax error on the sql statement.
I am compiling code in official rust docker container which uses ubuntu I believe as base image.
Do you have any ideas how do I link against a more up to date version of sqlite ?
Ps. Some explanation on how linking and versioning sqlite works would be really helpful

You can use bundled feature of , so sqlite will be part of executable and don’t use system sqlite. Thus you got exactly the same behaviour on all platforms.

im using the sqlite package which means by updating the library I need also to update the code which uses the sqlite api. Is it possible to update the sqlite version in the system ?