How to rename custom table name programatically in wordpress?

Yes, you can use the query function to rename tables.

global $wpdb;
$oldTable = $wpdb->prefix . "wpfd_docs";
$newTable = $wpdb->prefix . "ccdm_docs"; 
$renameOk = $wpdb->query("RENAME TABLE " . $oldTable . " TO " . $newTable);
if( $renameOk )
{
    echo 'All good';
}else{
    echo 'Failed to rename table. Last DB error: ' . $wpdb->last_error;
}