Setting renderstate conditionally in the shader

I want to use a shader wherein the vertex and fragment programs are the same, but the render state can be different – in particular, the blend state’s either BlendOver or BlendUnder.

Without making two shaders for this, can I conditionally set the state in a single shader?

Apparently, this can be done using shader properties. See Is it possible to change blend mode in shader at runtime? - Unity Answers