You can, but a cinnamon stick is better. Using ground cinnamon will still add flavor, but it will leave some cinnamon grains. Straining the syrup through a cheesecloth can help in this case.