How to prevent pg_dump from generating "SET default_table_access_method=heap;"?
No, there is no such way, because downgrading PostgreSQL is not supported.
You'll have to manually edit the dump and remove lines such as that until the dump loads without error. There could be other, more complicated problems than new parameters, see this question for an example in an older version.
If the dump is large, you could split it in three parts:
pg_dump --format=plain  --section=pre-data  --file=dbname-pre.sql  dbname
pg_dump --format=custom --section=data      --file=dbname-data.dmp dbname
pg_dump --format=plain  --section=post-data --file=dbname-post.sql dbname

You will only have to edit the first and last file, which are always small. The &quot;data&quot; section can be dumped in custom format and will be compressed. After editing, load the files in the same order.