Before 3.35.0, released March 2021, removing a column meant creating a replacement table, copying rows, dropping the original and renaming. That version added ALTER TABLE ... DROP COLUMN, which works unless the column is a primary key, has a UNIQUE constraint, is indexed, or is referenced by a partial index, view, trigger or generated column; in those cases it fails rather than dropping the dependency.
The same release added RETURNING on INSERT, UPDATE and DELETE, so a driver no longer needs last_insert_rowid() to learn generated values, and it works for multi-row statements. Both depend on the library version rather than the file format, so a runtime bundling an older SQLite, common on long-term-support Linux distributions and older Python builds, rejects the syntax. Check with SELECT sqlite_version() at runtime, not against the documentation.