Yes, the comma is necessary, but I'd explain it differently.
The standard order for the sentence would be the main clause (the dog might run away) followed by the conditional/dependent/"if" clause (if you leave the door open). In this case, no comma is required between the clauses.
In this example, however, the conditional (if) clause precedes the main clause, so a comma is required.
Ich neige dazu, im Englischen doch eher sehr sparsam mit Kommata umzugehen.
It would be better to learn the general rules since it would make your written English easier to follow. English does use plenty of commas when properly/carefully written. The comma usage from German that you can definitely forget, however, is the comma before "that" when you are translating "dass" or similar (i.e., "He said that he was hungry.)
The Purdue University Writing Lab (linked here) has a rather comprehensive summary of comma usage in American English (BE's rules seem to vary in a number of areas.)
This segment addresses the question:
2. Use commas after introductory a) clauses, b) phrases, or c) words that come before the main clause.
a. Common starter words for introductory clauses that should be followed by a comma include after, although, as, because, if, since, when, while.