Getting mixed answers on this one.
I did some search for example sentences, and they vary a lot it seems. A lot of them were missing the commas.
A link would be helpful in understanding why.
The commas are often optional, especially in a short sentence.
However, with a parenthetical phrase, if you use one comma you must use two - like brackets.
It's surrounded in some cases by a membranous envelope.
It's surrounded, in some cases, by a membranous envelope.
The above are both correct, but in your original longer sentence, the commas are preferable.
The use of commas for a parenthetical phrase is similar to the use of parentheses or dashes, as below. We wouldn't write the sentence as below, but it reinforces why the two commas (or none) are necessary.
It's surrounded (in some cases) by a membranous envelope.
It's surrounded - in some cases - by a membranous envelope.