The theory of Comparative Advantage in production and trade specifies that countries should engage in the production of goods and services for which they have a comparative advantage or lower opportunity cost than others. Do you think this theory can be effectively applied even where there is a wide technological or developmental gap between two countries?
Yes it can be used. The theory applies regardless of what’s the source of comparative advantage.
For example, if country A is able to produce 200 widgets and 50 apples and country B is able to produce 5 widgets and 45 apples you get comparative advantages - A in widgets and B in apples - and it does not really matter if these are due to technology, economic development, work ethic etc.
As a matter of fact differences in technology are sometimes mentioned in undergraduate class as source for the comparative advantage.
Actually in the original example of comparative advantage used by Ricardo the example was of England that had comparative advantage in cloth production due to new industrial technologies and Portugal which was more rural and hence had comparative advantage in wine. Also at the time England was more economically developed than Portugal- at least to the extent that can be seen from historical estimates provided by Maddison.