Yes, "I had to play libero" is good.
I don't know what a "libero" is.
My point is:
1. Play "position" (e.g. play fullback) is most common
2. Play "as a position" (e.g. play as a halfback) is also possible, but usually when contrasting with another position.