Disclaimer: Obviously this is not legal advice. It is just a few thoughts about what may or may not be true, let alone the fact that legal questions are intimately tied up with particular jurisdictions and so on.
What elements of a cognitive test are copyright?
Part of violating copyright is actually copying. So if you actually copy any specific part of the test, such as specific item wording, or images, or instructions, then you might be in trouble. Likewise, many test names if they are not generic might have a range of intellectual property protection including copyright, trademarks, and passing off.
In contrast taking inspiration from the the idea for a test and building your own seems a lot less likely to breach copyright. It's even better if instead of copying the idea for a test you are able to understand the scientific literature and appreciate that a certain type of test has been developed by many people already. You then take inspiration for the type of test from the literature rather than copying a particular test.
To follow on from your example, "digit span" is an example of a common experimental task. There are many others (e.g., simple and choice reaction time, stroop tasks, various sensory discrimination tasks, etc.). Likewise, in the case of intelligence tests, there are huge numbers of subtests or item types which are not owned by anyone in particular, such as vocabulary items, analogies, general knowledge, simple mathematical questions, and so on.
You can make tests involving these kinds of tests without having to copy any particular existing test.
Likewise with all these tests there are many decisions that the test developer needs to make including specific item content, which subtests will go together, what to call the tests, how many response options to include, how many items to retain, what difficulty to choose, and so on.
If you are serious about developing a cognitive test battery then you would need to think about these ideas. You would also want to be informed about psychometrics and the many approaches that have been adopted for creating tests of a given type. With this knowledge and a plan you would not need to copy any one test.
Is it possible to buy the rights to a test to adapt it?
I imagine that if you offer enough money to the owner of the test copyright, then they would generally allow you to do this. Presumably the cost of such a deal would depend on what your planned use of the test would be. If you just want to adapt a test for your own research, then that does not challenge their business model. In fact, you sometimes might be able to do this as long as you pay for each test use or whatever the licensing scheme is. However, if you want to sell a product that competes against their, then presumably that would cost a lot more. By way of example, I remember hearing about a case study of how a US commercial personality test was adapted to the Australian market. Australian norms were developed and some minor wording changes were made. I don't know the details of the commercial arrangement, but it clearly shows that it is possible.
In an academic context, there are many tests that are free to use, and the implied rights of use are often a little ambiguous. Academics often adapt such tests for their specific research purposes. It makes sense in this case to talk to the academic who developed the test to see whether they mind you performing the adaptation.