In Diplomacy, can a fleet in a coastal province be used to convoy?
Fleets in coastal provinces cannot convoy.  To convoy, you have to be in the open water.  From the rules (emphasis mine):

Convoying an Army Across One Water Province
A Fleet in a water province (not a coastal province) can convoy an
Army from any coastal province adjacent to that water province to
any other coastal province adjacent to that water province.


Convoying an Army Across Several Water Provinces
If Fleets occupy adjacent water provinces, an Army can be convoyed
through all these water provinces on one turn, landing in a coastal
province adjacent to the final Fleet in the chain

Thus, in the situation you describe, a fleet in Trieste cannot convoy; it would need to be in the Adriatic Sea.