Chosen Solution

Is there a way to unlock a locked icloud ipad 2?

No. Either take it in with your original receipt to Apple or hold the gun on the guy you got it from until you get the number.

short answer is no. long answer is there are some shady business practices that try and get around it but the only thing I’ve seen that “worked” is replacing the logic board which is essentially replacing the whole device which makes 0 sense and isn’t worth doing. If the device is legitimately yours, and can provide proof to that end (a copy of the original receipt for example) an Apple store can help you. Unfortunately, Apple doesn’t provide a way of returning the device to its original owner either. While Apple can see who it belongs to, and they have contact information for that person they do not ever use it to return a lost/stolen device to them and won’t contact the owner on your behalf. Why would Apple help someone get their already purchased device back when they can expect that a new apple device will be purchased since they don’t have that one anymore. One more reason I hate Apple.