Virtual power plants (VPPs) offer an effective approach for managing distributed energy resources (DERs), including microturbines, distributed generators, demand response aggregators, and energy storage systems. This technology significantly enhances the economic efficiency and flexibility of distribution network systems. This study aims to facilitate a flexible power exchange between the distribution network system and the upper-level grid by aggregating the power flexibility of heterogeneous DERs via a VPP. Additionally, it introduces a methodology for optimal aggregation and disaggregation within a coordinated operation framework between the VPP and distribution network operator (DNO). On one hand, the VPP can determine its day-ahead feasible region and real-time flexible regulation power based on operational constraints of DERs and representative data provided by the DNO, circumventing the need for detailed network information. On the other hand, day-ahead and real-time correction procedures for the DER cost functions are proposed, effectively neutralizing the impact of network operational constraints on these cost functions. Consequently, precise cost functions for both the active power and the flexible regulation power aggregated by the VPP are derived. Employing this aggregated cost function enables the determination of a cost-minimized optimal scheduling solution in real-time by solving a fundamental economic dispatch problem, significantly alleviating computational demands. Finally, case studies demonstrate that the proposed method achieves an error in aggregated power of only 0.77%, compared to the precise computation method that requires comprehensive system information. The proposed optimal VPP disaggregation scheme exhibits power discrepancies of 0.63% and cost discrepancies of 0.91% relative to the precise method. Additionally, when implementing the most cost-effective demand response plan based on the proposed cost function, the average costs for aggregators are reduced by 19.7%.