I don't know for sure, but I doubt it. Most treated lumber is pretty obvious and most cedar is intended for cosmetic uses and also is considered intrinsically weather resistant.

OTOH, I suspect you'll have a fairly limited lifespan in direct contact to moist earth, esp. with 3/4" thicknesses.

But if it's free, what the hay.

Dunno about the 2x4s. Most fencing around here uses cedar 2x4s, but your situation might be different.

As a counter point, if this is re-cycled, some of it may be treated by the home owner (deck sealer or similar), although chances are pretty slight.

-john