Like Postgres has PostGIS, SQLite has Spatialite. https://www.gaia-gis.it/fossil/libspatialite/index
Unsure about integrating it with Pocketbase but I imagine it is reasonable to do.