Where did you hear that the "if + past simple" construction can't be used outside of the second conditional?
A hundred years ago, people could bury their relatives in their
gardens, if they wanted.
is an example of what grammaring.com calls the "zero conditional", used for uncomplicated "if-then" cause-and-effect situations which hold true generally. "Zero conditional" can be about current situations or the past.
The 2 examples they use are:
If you heat water to 100 degrees Celsius, it boils.
If I got home late, my mom scolded me.
The second sentence, which takes place in the past, uses the simple past tense for both of the verbs. Your sentence is similar.
If you re-order the clauses, you have
... if they wanted, people could bury their relatives in their
gardens.
"Could" is the simple past of "can", in the sense of "to be permitted or allowed". "Wanted" is also a simple past tense verb. So your sentence is a "zero conditional" construction in the past, and its grammar is fine.