Yes, this is possible.
Configure the Time Capsule to "create a wireless network", name the network and set up a password for the network.
When doing this, ignore the error messages about having no Ethernet cable connected to the WAN port on the Time Capsule and/or not having an internet connection.
Of course you'll need to connect your Mac to this WiFi network for backing up.
Hope this helps!
This edit provides the actual steps for creating a wireless network from the Time Capsule.
- In most cases you would usually connect your DSL/Cable modem to your Time Capsule using the ethernet WAN port. However, in your case you won't need to do this since you're not wanting the internet.
- Open Airport Utility (usually located in the Utilities folder of macOS). Or, if you happen to be on a Windows machine you would usually go to Start > All Programs > AirPort
- Follow the instructions on the screen for creating a new wireless network.
- I've made the assumption you're still wanting to backup wirelessly - but you do also have the option of connecting the computer directly via ethernet cable. This would involve different steps.
- Different versions of Airport Utility provide different options, so if my steps don't make sense please provide the version of OS you're running as well as the version of Airport Utility.
- If you have problems, it may be worth returning your Time Capsule to factory settings - use something pointy to press and hold the Reset button for about 5 or so seconds (you'll know when as the status light starts flashing).
- If you get stuck, you can also visit Apple's Airport page which will provide additional info, including access to manuals etc.
Let me know how you go.