Maybe. Kind of.
Wood is a natural composite of cellulose fibers that are strong in tension and embedded in a matrix of lignin that resists compression.
If the cybernetics instead of being a robotic endoskeleton are much smaller and refined and permeate and largely replace the lignin in the wood, the wood would lose its natural rigidity and instead bend with the cybernetics. The tree could uproot itself and walk.
This would damage the roots but they could recover if the cybernetic structures stores water and nutrients for the tree to survive while the roots heal. You'd probably want some underground cybernetics to protect the roots when uprooting and to allow the cyborg tree to dig in when re-rooting.
Cybernetics would also permeate the bark of the tree. This could work as on armor against damage. It would also get the cybernetics close enough to the surface to get energy from sunlight. Possibly from the green light that filters thru the leaves of the canopy.
Alternately or additionally the cybernetics could have a symbiosis with the tree. It would use energy produced by the tree in exchange for improved water transport and possibly artificial roots that can dig thru the soil instead of just growing. This would also compensate issues caused by reduced lignin to water transport and occasional uprooting to the roots, so doing this would make sense even if you have solar cells.
This would potentially allow the cyborg to grow higher (since water transport is a major limiting factor) than normal oaks and in soils hostile to normal trees. For example cybernetics do not require air, so flooding would not be an issue. Likewise soil contamination by toxic pollution would not kill cybernetic roots. The tree could also grow older since cybernetics could fix damage overtime. The cybernetics could also actively kill parasites including bacterial and fungal infections. Even if it cannot detect bacteria it can detect and sterilise infected plant tissue and then let the plant grow back to fill the void.
These benefits offer a possible reason for someone to bother creating these cyborgs. Maybe they are not there to guard the trees from visitors but to allow the species to survive a devastating and rapidly mutating fungal disease. Or severe toxic contamination issue the aliens felt responsible for. So they reprogrammed and re-purposed something they already had available.
Like those military nanites designed to wipe out entire planets that never got used because the Emperor preferred to blow up the planets instead. Or maybe they just threw out the useless obsolete junk before it activates on a planet they are on.
Or maybe they just wanted a nice tree that grows taller than normal, is resistant disease, floods, and drought, can escape forest fires, can last for millennia without needing replacement and looks really nice in front of the porch. Also sends a text if neighbour tries to "borrow" the lawnmower.
Trees do not have legs and arms though. So it wouldn't really walk or fight like a treant. Instead the roots would slither like a knot of different sized snakes on speed. They'd also fight by entangling and eventually constricting their prey like a mix of an octopus and a constrictor snake.
The cyborg might also reasonably have access to chemical or dazzle weapons. Microwave or sound based attacks might also exist. Reasonably these would be powered up tree-to-tree communications systems. Although the chemicals might be pesticides.