First step get to know as much about the way your knees work.
And then to ask the doctors what the operation entails and how much physiotherapy you are going to need. (If you don't know already) Find yourself a good physio - preferably one that rides horses.
But, last summer I watched a young man - who had no use of his legs whatsoever- ride a dressage test. His legs just hung down somehow - I don't know I could not watch too closely it was too emotional. He did a very good test. He would have loved to have working knees of any sort but in fact he didn 't need them, cos he had no legs.
If you had seen him then you would realize that it is all up to you - if you want to ride then you will.
As for mounting - buy an electric hoist! Or teach the horse to bend down (there is a film about ancient Jerusalem where the horse kneels down for the King to dismount)
Best of luck with the operation.