Yes, you can use the gift card to buy anything as long as you have sufficient balance in it.
Get more with City Rewards
"If you have a City Rewards account, you can link your City Gift card balance to your City Rewards cash wallet.
Not a member yet? Sign up now to start earning points, enjoy member promotions and get enhanced card security with the City Rewards app."