Buying the Toontown CD does not automatically make you a member. However, if the CD comes bundled with a gift card, then yes, you can happily use it to become a member.
So it is worth checking whether the version you are buying includes that gift card before you purchase.
With the right edition, you will be all set to enjoy membership benefits.