It depends on how you define a cycle in an undirected graph.
The problem is that you have to use the same edge twice in order to complete the cycle in the undirected graph. While in the directed graph you use different edges to get from A to B and from B to A
solved Does every undirected graph contain a cycle?