How can I use a text and a function php

Try

<?php echo "Right sidebar".get_the_content(); ?>

Don’t use echo for the_content, it’s already echoed out, use get_the_content instead.