Question: Suppose that person A booked today a hotel room for 3 nights in Dubai to travel in the upcoming February with Hotel Z (room price = 50€). In January, person A changed his mind about the visit and would cancel it. Person B, just realized that next week he has to be in Dubai, so he checked the price and found that room prices are almost 130€.

Is it possible for person A to sell his booking confirmation to person B? (Person A sell it for 70€ and person B can save up to 60€ and if there is hosting web service that carries this service, then it can take 10%)...

Will Hotel Z mind if such a thing happens? I am assuming that hotel policy is not violated by this kind of booking.

And how to make sure of this conduct is acceptable and could work?

Answer: 
Well...yes, it probably violates the terms in some way, especially if persons A and B are unrelated and otherwise unknown to each other.

However, most hotels are much looser about who uses a reservation than airlines so it's much more possible than not. Many (most?) actually accommodate this situation by allowing another name to be added for check-in in case that person arrives earlier then the one who made the booking.
I have booked (with a legitimate purpose) quite a few hotel rooms for other people. Reservation in my name with my credit card. But I usually mention, from reservation time, that it's for someone else, and mention the name.

You could try emailing the hotel, explaining that your colleague is coming instead of you, and could they update the reservation details.

On the other hand, a 50 EUR/night hotel in Dubai is at the lower end of things. They might prove to be quite flexible.

FYI I had a look at the prices for the Accor group in Dubai next week, plenty of options between 50 and 80 EUR...