Notching 4x4 to Use as Fence Rail
Structurally, maybe. The weight will be twice as much (assuming two rails) on the same wood at the notch due to the larger lumber. This could result in more sagging or even breakage.
Some other ideas...
Add posts and route around the tree
            ______
___________|      |
___________|      |
           |______|
              | |
            __|_|_
           |      |_____
           |      |_____
           |______|

Space out the one panel
            ______
___________|      |_
___________|      | | &lt;-- offset spacer block
           |______| |
                  |_|________________________
                  |__________________________