In short, yes. This is actually a tricky question because it depends on what you're trying to do, how cheap, and how simply, you want to do it.
If I asked you to build a midi keyboard from scratch, could you do it? In fact, I've done essentially what you're asking about - I built a midi keyboard from the keybed existing in a cheap casio I bought at Goodwill. I'll spare you the technical details but I'll try to give you an idea of the scope of the project. The keyboard could only emit sound, no midi. I connected the keys to an Arduino development board and wrote code which interpreted the keys input and output midi via the Arduino's USB cord.
For more technical detail, here's a brief explanation: First I removed the keybed and cut the wires which connect to the button matrix. Then I connected those wires to a shift register, and from the shift register into my Arduino. Then I wrote code which decoded the shift register input, which now represented my button matrix. Then I wrote code to decode the button matrix which I reversed engineered, mostly with a multimeter. Finally, I used an Arduino midi library to output midi over the serial bus and used an intermediary program to read that midi over USB and act as a virtual midi device which could be recognized by Ableton. This took some time. If I had to do it again, I could but it would take me just as long since most of the challenge depends on decoding the button matrix which will depend on what keyboard you get. Please feel free to ask any questions. I did this a year ago but there wasn't enough documentation online and I had to figure a lot out on my own. If possible I hope I can make it easier for you if you do go about the project.