I think, both sentences are possible, but one is in active voice and the other in passive voice. See the word “can” and “can be”. Can be is the passive voice of can.
Maybe the following sentences make it clearer:
I cannot compare with you. You cannot be compared by me
If you have a question about the English language and would like to ask one of our many English teachers and language experts, please click the button below to let us know: