I am going to presume that when you say "iCloud" you mean your Apple Account. You say you apparently do not remember either the Apple ID (the email address used for your Apple Account) or the password. If you care about the account you can see if you can recover usage, but also note that if you have not used this account in 10 years Apple may well have deleted it from its system (they say that you need to use it at least once per year for them to keep it but I don't know how strict they are about that).
This article tells you the various ways you can try to discover your forgotten Apple ID --> If you forgot your Apple Account primary email address or phone number - Apple Support Typically an Apple ID is an email address you have used. If you are currently using a mobile device that is logged into your account, go to Settings and tap your name at the top. Look in Keychain, and in a browser's security settings if you use it to automatically sign into Apple when using a browser.
This article outlines what to do If you forgot your Apple ID password --> If you forgot your Apple Account password - Apple Support
or go directly to this link --> http://iforgot.apple.com/
If you find you can’t sign in, reset your password, or receive verification codes, you can request account recovery (read this support article: How to use account recovery when you can’t reset your Apple Account password - Apple Support ) to regain access to your account. Account recovery might take a few days or longer, depending on the specific account information you can provide to verify your identity. More detail in —> Activation Lockout Issues - Apple Community
If you still need help this page provides country-specific Apple Support contact information ➞ Contact Apple Support - Apple Support
If you no longer care about the account but simply want to recover use of the equipment, you will need the original receipt of sale by Apple for the device and can request the device be reset. Go to this page to start that https://al-support.apple.com/#/additional-support
If you cannot get the device unlocked then read this section from the very bottom of Apple Trade In - Apple :
"Does Apple offer recycling?
Yes. Apple Trade In lets you recycle any Apple device (including devices from Apple-owned brands) at any Apple Store and on Apple for free. That includes your batteries and old electronic products as well as free, on-demand packaging recycling for our commercial, education, and institutional customers. When we receive your device, it will be thoroughly inspected to determine if components can be recycled or reused. Whether recycled or reused, all activities relating to the processing of your device will be managed in an environmentally responsible way."
Finally, note that there is a difference between a passcode (which is to what the first link Smilin-Brian refers) and a password. You say you need a password.