You only need the_content filter to add the modal, but bootstrap.js is needed to make it work.
add_action('wp_enqueue_scripts', array($this, 'enqueue_bootstrap');
public function enqueue_bootstrap(){
wp_register_script( 'bootstrap', plugins_url( 'your-plugin/assets/js/bootstrap.min.js' ) );
wp_enqueue_script( 'bootstrap' );
}
EDIT:
You need to add $content argument to your function.
As the codex says
Note that the filter function must return the content after it is finished processing, or site visitors will see a blank page and other plugins also filtering the content may generate errors.
in your case:
public function dmd_fav_modal_box($content) {
$modal="<div class="modal fade" id="dmd_favorite_modal" tabindex="-1" role="dialog" aria-labelledby="dmd_favorite_modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<p>Test</p>
</div>
<!--div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div-->
</div>
</div>
</div>";
return $modal.$content;